schutzbot: don't copy dnf repo file between stages
Now that the repository URLs are predictable, don't 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
692a8076bb
commit
4bd891be9e
3 changed files with 11 additions and 39 deletions
24
schutzbot/Jenkinsfile
vendored
24
schutzbot/Jenkinsfile
vendored
|
|
@ -51,10 +51,6 @@ pipeline {
|
|||
retry(3) {
|
||||
sh "schutzbot/mockbuild.sh"
|
||||
}
|
||||
stash (
|
||||
includes: 'osbuild-mock.repo',
|
||||
name: 'fedora32'
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('F33') {
|
||||
|
|
@ -68,10 +64,6 @@ pipeline {
|
|||
retry(3) {
|
||||
sh "schutzbot/mockbuild.sh"
|
||||
}
|
||||
stash (
|
||||
includes: 'osbuild-mock.repo',
|
||||
name: 'fedora33'
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('EL8') {
|
||||
|
|
@ -86,10 +78,6 @@ pipeline {
|
|||
retry(3) {
|
||||
sh "schutzbot/mockbuild.sh"
|
||||
}
|
||||
stash (
|
||||
includes: 'osbuild-mock.repo',
|
||||
name: 'rhel8cdn'
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -102,7 +90,6 @@ pipeline {
|
|||
agent { label "f32cloudbase && x86_64 && aws" }
|
||||
environment { TEST_TYPE = "base" }
|
||||
steps {
|
||||
unstash 'fedora32'
|
||||
run_tests('base')
|
||||
}
|
||||
post {
|
||||
|
|
@ -123,7 +110,6 @@ pipeline {
|
|||
DISTRO_CODE = "fedora32"
|
||||
}
|
||||
steps {
|
||||
unstash 'fedora32'
|
||||
run_tests('image')
|
||||
}
|
||||
post {
|
||||
|
|
@ -144,7 +130,6 @@ pipeline {
|
|||
AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test')
|
||||
}
|
||||
steps {
|
||||
unstash 'fedora32'
|
||||
run_tests('integration')
|
||||
}
|
||||
post {
|
||||
|
|
@ -156,7 +141,6 @@ pipeline {
|
|||
stage('F32 OSTree') {
|
||||
agent { label "f32cloudbase && psi && x86_64" }
|
||||
steps {
|
||||
unstash 'fedora32'
|
||||
run_tests('ostree')
|
||||
}
|
||||
post {
|
||||
|
|
@ -169,7 +153,6 @@ pipeline {
|
|||
agent { label "f33cloudbase && x86_64 && aws" }
|
||||
environment { TEST_TYPE = "base" }
|
||||
steps {
|
||||
unstash 'fedora33'
|
||||
run_tests('base')
|
||||
}
|
||||
post {
|
||||
|
|
@ -190,7 +173,6 @@ pipeline {
|
|||
DISTRO_CODE = "fedora33"
|
||||
}
|
||||
steps {
|
||||
unstash 'fedora33'
|
||||
run_tests('image')
|
||||
}
|
||||
post {
|
||||
|
|
@ -207,7 +189,6 @@ pipeline {
|
|||
AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test')
|
||||
}
|
||||
steps {
|
||||
unstash 'fedora33'
|
||||
run_tests('integration')
|
||||
}
|
||||
post {
|
||||
|
|
@ -219,7 +200,6 @@ pipeline {
|
|||
stage('F33 OSTree') {
|
||||
agent { label "f33cloudbase && psi && x86_64" }
|
||||
steps {
|
||||
unstash 'fedora33'
|
||||
run_tests('ostree')
|
||||
}
|
||||
post {
|
||||
|
|
@ -235,7 +215,6 @@ pipeline {
|
|||
RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production')
|
||||
}
|
||||
steps {
|
||||
unstash 'rhel8cdn'
|
||||
run_tests('base')
|
||||
}
|
||||
post {
|
||||
|
|
@ -257,7 +236,6 @@ pipeline {
|
|||
DISTRO_CODE = "rhel8"
|
||||
}
|
||||
steps {
|
||||
unstash 'rhel8cdn'
|
||||
run_tests('image')
|
||||
}
|
||||
post {
|
||||
|
|
@ -279,7 +257,6 @@ pipeline {
|
|||
RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production')
|
||||
}
|
||||
steps {
|
||||
unstash 'rhel8cdn'
|
||||
run_tests('integration')
|
||||
}
|
||||
post {
|
||||
|
|
@ -291,7 +268,6 @@ pipeline {
|
|||
stage('EL8 OSTree') {
|
||||
agent { label "rhel8cloudbase && psi && x86_64" }
|
||||
steps {
|
||||
unstash 'rhel8cdn'
|
||||
run_tests('ostree')
|
||||
}
|
||||
post {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ function retry {
|
|||
|
||||
# Get OS details.
|
||||
source /etc/os-release
|
||||
ARCH=$(uname -m)
|
||||
|
||||
if [[ -n "${RHN_REGISTRATION_SCRIPT:-}" ]] && ! sudo subscription-manager status; then
|
||||
greenprint "Registering RHEL"
|
||||
|
|
@ -38,9 +39,16 @@ echo -e "fastestmirror=1" | sudo tee -a /etc/dnf/dnf.conf
|
|||
greenprint "Adding osbuild team ssh keys"
|
||||
cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
|
||||
|
||||
greenprint "Setting up a dnf repository for the RPMs we built via mock"
|
||||
sudo cp osbuild-mock.repo /etc/yum.repos.d/osbuild-mock.repo
|
||||
sudo dnf repository-packages osbuild-mock list
|
||||
greenprint "Setting up a dnf repository with the RPMs we want to test"
|
||||
sudo tee /etc/yum.repos.d/osbuild-composer.repo << EOF
|
||||
[osbuild-composer]
|
||||
name=osbuild composer ${GIT_COMMIT}
|
||||
baseurl=http://osbuild-composer-repos.s3-website.us-east-2.amazonaws.com/osbuild-composer/${ID}-${VERSION_ID}/${ARCH}/${GIT_COMMIT}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
# Default dnf repo priority is 99. Lower number means higher priority.
|
||||
priority=5
|
||||
EOF
|
||||
|
||||
if [[ $ID == rhel ]]; then
|
||||
greenprint "Setting up EPEL repository"
|
||||
|
|
|
|||
|
|
@ -81,15 +81,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 osbuild-mock.repo << EOF
|
||||
[osbuild-mock]
|
||||
name=osbuild mock ${COMMIT}
|
||||
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