From 484bb9a182f74f820d418c2ca038d57e6e9928fb Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 29 Jul 2020 11:33:02 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=A3=20Use=20RHEL=208.3=20beta=20conten?= =?UTF-8?q?t=20from=20CDN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the nightly repos from the RHEL 8.3 jobs and replace them with CDN registration for beta content. Signed-off-by: Major Hayden --- schutzbot/Jenkinsfile | 10 +++++++--- schutzbot/mockbuild.sh | 17 +++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/schutzbot/Jenkinsfile b/schutzbot/Jenkinsfile index 968a7b045..d33bb9e11 100644 --- a/schutzbot/Jenkinsfile +++ b/schutzbot/Jenkinsfile @@ -88,8 +88,7 @@ pipeline { agent { label "rhel83cloudbase && x86_64" } environment { AWS_CREDS = credentials('aws-credentials-osbuildci') - NIGHTLY_REPO = credentials('rhel8-nightly-repo') - NIGHTLY_MOCK_TEMPLATE = credentials('rhel8-nightly-mock-template') + RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production-beta') } steps { sh "schutzbot/ci_details.sh" @@ -259,7 +258,10 @@ pipeline { stage('EL8.3 Base') { agent { label "rhel83cloudbase && x86_64" } - environment { TEST_TYPE = "base" } + environment { + TEST_TYPE = "base" + RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production-beta') + } steps { unstash 'rhel83' run_tests('base') @@ -277,6 +279,7 @@ pipeline { AWS_CREDS = credentials('aws-credentials-osbuildci') AZURE_CREDS = credentials('azure') OPENSTACK_CREDS = credentials("psi-openstack-clouds-yaml") + RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production-beta') } steps { unstash 'rhel83' @@ -293,6 +296,7 @@ pipeline { environment { TEST_TYPE = "integration" AWS_CREDS = credentials('aws-credentials-osbuildci') + RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production-beta') } steps { unstash 'rhel83' diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index dae4a4f0c..304c2c89d 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -69,12 +69,17 @@ greenprint "🔧 Building source RPMs." make srpm make -C osbuild srpm -# Fix RHEL 8 mock template for non-subscribed images. -if [[ "${ID}${VERSION_ID//./}" == rhel83 ]]; then - greenprint "📋 Updating RHEL 8 mock template for unsubscribed image" - sudo cp $NIGHTLY_MOCK_TEMPLATE /etc/mock/templates/rhel-8.tpl - cat $NIGHTLY_REPO | sudo tee -a /etc/mock/templates/rhel-8.tpl > /dev/null - echo '"""' | sudo tee -a /etc/mock/templates/rhel-8.tpl > /dev/null +# Update the mock configs if we are on 8.3 beta. +if [[ $VERSION_ID == 8.3 ]]; then + # Remove the existing (non-beta) repos from the template. + sudo sed -i '/# repos/q' /etc/mock/templates/rhel-8.tpl + + # Add the enabled repos to the template. + cat /etc/yum.repos.d/redhat.repo | sudo tee -a /etc/mock/templates/rhel-8.tpl + + # We need triple quotes at the end of the template to mark the end of + # the repo list. + echo '"""' | sudo tee -a /etc/mock/templates/rhel-8.tpl fi # Compile RPMs in a mock chroot