diff --git a/schutzbot/Jenkinsfile b/schutzbot/Jenkinsfile index b893dcf35..e2f8b8796 100644 --- a/schutzbot/Jenkinsfile +++ b/schutzbot/Jenkinsfile @@ -64,7 +64,7 @@ pipeline { } } stage('RHEL 8 CDN') { - agent { label "rhel8" } + agent { label "rhel8cdn && minimal" } environment { AWS_CREDS = credentials('aws-credentials-osbuildci') } @@ -79,9 +79,11 @@ pipeline { } // NOTE(mhayden): RHEL 8.3 is only available in PSI for now. stage('RHEL 8.3 Nightly') { - agent { label "rhel83 && psi" } + agent { label "rhel83nightly && minimal" } environment { AWS_CREDS = credentials('aws-credentials-osbuildci') + NIGHTLY_REPO = credentials('rhel8-nightly-repo') + NIGHTLY_MOCK_TEMPLATE = credentials('rhel8-nightly-mock-template') } steps { sh "schutzbot/ci_details.sh" diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index 1a790cb03..537237ddb 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -16,6 +16,14 @@ sudo rm -f /etc/yum.repos.d/fedora*modular* # dnf operations. echo -e "fastestmirror=1\ninstall_weak_deps=0" | sudo tee -a /etc/dnf/dnf.conf +# Mock is only available in EPEL for RHEL. +if [[ $ID == rhel ]]; then + greenprint "📦 Setting up EPEL repository" + curl -Ls --retry 5 --output /tmp/epel.rpm \ + https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + sudo rpm -Uvh /tmp/epel.rpm +fi + # Install requirements for building RPMs in mock. greenprint "📦 Installing mock requirements" sudo dnf -y install createrepo_c make mock rpm-build @@ -69,8 +77,9 @@ make -C osbuild srpm # Fix RHEL 8 mock template for non-subscribed images. if [[ $NODE_NAME == *rhel8[23]* ]]; then greenprint "📋 Updating RHEL 8 mock template for unsubscribed image" - sudo curl --retry 5 -Lsko /etc/mock/templates/rhel-8.tpl \ - https://gitlab.cee.redhat.com/snippets/2208/raw + sudo mv $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 fi # Compile RPMs in a mock chroot