schutzbot: don't copy dnf repo file between stages
Repository URLs are predictable. There's no need to use Jenkins' stash feature to pass the repo file between stages. Instead, simply create the repo file where it is needed, in deploy.sh.
This commit is contained in:
parent
cc2de53747
commit
2ac9a5b73c
3 changed files with 9 additions and 26 deletions
10
schutzbot/Jenkinsfile
vendored
10
schutzbot/Jenkinsfile
vendored
|
|
@ -50,10 +50,6 @@ pipeline {
|
|||
retry(3) {
|
||||
sh "schutzbot/mockbuild.sh"
|
||||
}
|
||||
stash (
|
||||
includes: 'mock.repo',
|
||||
name: 'fedora32'
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('EL8') {
|
||||
|
|
@ -67,10 +63,6 @@ pipeline {
|
|||
retry(3) {
|
||||
sh "schutzbot/mockbuild.sh"
|
||||
}
|
||||
stash (
|
||||
includes: 'mock.repo',
|
||||
name: 'rhel8cdn'
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -86,7 +78,6 @@ pipeline {
|
|||
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
||||
}
|
||||
steps {
|
||||
unstash 'fedora32'
|
||||
run_tests('integration')
|
||||
}
|
||||
post {
|
||||
|
|
@ -103,7 +94,6 @@ pipeline {
|
|||
RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production')
|
||||
}
|
||||
steps {
|
||||
unstash 'rhel8cdn'
|
||||
run_tests('integration')
|
||||
}
|
||||
post {
|
||||
|
|
|
|||
|
|
@ -62,13 +62,18 @@ fi
|
|||
# Add osbuild team ssh keys.
|
||||
cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
|
||||
|
||||
# Set up a dnf repository for the RPMs we built via mock.
|
||||
sudo cp mock.repo /etc/yum.repos.d/
|
||||
|
||||
# Set up dnf repositories with the RPMs we want to test
|
||||
sudo tee /etc/yum.repos.d/osbuild.repo << EOF
|
||||
[osbuild]
|
||||
[koji-osbuild]
|
||||
name=osbuild ${GIT_COMMIT}
|
||||
baseurl=${DNF_REPO_BASEURL}/koji-osbuild/${ID}-${VERSION_ID}/${ARCH}/${GIT_COMMIT}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
# Default dnf repo priority is 99. Lower number means higher priority.
|
||||
priority=5
|
||||
|
||||
[osbuild]
|
||||
name=osbuild ${OSBUILD_COMMIT}
|
||||
baseurl=${DNF_REPO_BASEURL}/osbuild/${ID}-${VERSION_ID}/${ARCH}/${OSBUILD_COMMIT}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
|
|
|
|||
|
|
@ -87,15 +87,3 @@ greenprint "☁ Uploading RPMs to S3"
|
|||
pushd repo
|
||||
s3cmd --acl-public sync . s3://${REPO_BUCKET}/
|
||||
popd
|
||||
|
||||
# Create a repository file.
|
||||
greenprint "📜 Generating dnf repository file"
|
||||
tee mock.repo << EOF
|
||||
[schutzbot-mock]
|
||||
name=schutzbot mock ${GIT_SHA} ${ID}${VERSION_ID//./}
|
||||
baseurl=${REPO_URL}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
# Default dnf repo priority is 99. Lower number means higher priority.
|
||||
priority=5
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue