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