schutzbot: add rhel 8.4 tests to jenkins pipeline

rhel 8.4 tests are added. The configs are based off of those used for
rhel 8.3. The Schutzbot Mockbuild, Base, Image, Integration, and OSTree
tests are added for 8.4. Repo overrides are added for the rhel 8.4 tests
so that the tests use rpmrepo snapshots.

The mockbuild uses the jenkins rhel84-nightly-repo credential to
override the rhel mock template's repos with rhel 8.4 nightly repos.
These repos are stored in a credential because they are internal links.

The image tests and koji tests need a special distro selector since the
rhel-8 test cases are only for rhel 8 versions less than 8.4. The rhel
8.4 tests are named with the rhel-84 pattern whereas the other rhel 8
versions have the rhel-8 pattern.

Also, instead of having only rhel-8 and rhel-8-beta repo configs for the
tests, we now have a specific repo config for each rhel release we test.
The repo is also now pulled from an rpmrepo snapshot. For whichever
distro is being tested, the approriate repo config will be copied to
/etc/osbuild-composer/repositories as rhel-8 and rhel-8-beta since this
is the naming osbuild-composer looks for. For testing purposes, the
rhel-8 and rhel-8-beta repo should be the same since eventually all rhel
releases will go from beta to not beta. The fedora repo overrides are
already done in tools/provision.sh so the rhel override is set there as
well. Currently, only rhel 8.4 requires an override.
This commit is contained in:
Jacob Kozol 2020-10-28 16:12:58 +01:00 committed by jkozol
parent 0dd17ae3f7
commit 7b40a3b38e
9 changed files with 181 additions and 5 deletions

80
schutzbot/Jenkinsfile vendored
View file

@ -80,6 +80,21 @@ pipeline {
}
}
}
stage('EL8.4') {
agent { label "rhel84cloudbase && x86_64 && psi" }
environment {
AWS_CREDS = credentials('aws-credentials-osbuildci')
AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test')
RHEL84_NIGHTLY_REPO = credentials('rhel84-nightly-repo')
}
steps {
sh "schutzbot/ci_details.sh"
retry(3) {
sh "schutzbot/mockbuild.sh"
}
}
}
}
}
@ -276,6 +291,71 @@ pipeline {
}
}
}
stage('EL8.4 Base') {
agent { label "rhel84cloudbase && x86_64 && psi" }
environment {
TEST_TYPE = "base"
}
steps {
run_tests('base')
}
post {
always {
preserve_logs('rhel84-base')
}
}
}
stage('EL8.4 Image') {
agent { label "rhel84cloudbase && psi && x86_64" }
environment {
TEST_TYPE = "image"
AWS_CREDS = credentials('aws-credentials-osbuildci')
AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test')
AZURE_CREDS = credentials('azure')
OPENSTACK_CREDS = credentials("psi-openstack-creds")
VCENTER_CREDS = credentials('vmware-vcenter-credentials')
DISTRO_CODE = "rhel84"
}
steps {
run_tests('image')
}
post {
always {
preserve_logs('rhel84-image')
sh (
label: "Run cloud cleaner just in case something failed",
script: "schutzbot/run_cloud_cleaner.sh"
)
}
}
}
stage('EL8.4 Integration') {
agent { label "rhel84cloudbase && x86_64 && psi" }
environment {
TEST_TYPE = "integration"
AWS_CREDS = credentials('aws-credentials-osbuildci')
AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test')
}
steps {
run_tests('integration')
}
post {
always {
preserve_logs('rhel84-integration')
}
}
}
stage('EL8.4 OSTree') {
agent { label "rhel84cloudbase && psi && x86_64" }
steps {
run_tests('ostree')
}
post {
always {
preserve_logs('rhel84-ostree')
}
}
}
}
}
}

View file

@ -63,6 +63,17 @@ greenprint "🧬 Using mock config: ${MOCK_CONFIG}"
greenprint "📦 SHA: ${COMMIT}"
greenprint "📤 RPMS will be uploaded to: ${REPO_URL}"
# rhel 8.4 will run off of the nightly repos and does not have a redhat subscription
if [[ $VERSION_ID == 8.4 ]]; then
greenprint "📋 Updating RHEL 8 mock template for unsubscribed image"
sudo sed -i '/# repos/q' /etc/mock/templates/rhel-8.tpl
# remove the subscription check
sudo sed -i "s/config_opts\['redhat_subscription_required'\] = True/config_opts['redhat_subscription_required'] = False/" /etc/mock/templates/rhel-8.tpl
cat "$RHEL84_NIGHTLY_REPO" | sudo tee -a /etc/mock/templates/rhel-8.tpl > /dev/null
# 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
greenprint "🔧 Building source RPM"
git archive --prefix "osbuild-composer-${COMMIT}/" --output "osbuild-composer-${COMMIT}.tar.gz" HEAD
sudo mock -r "$MOCK_CONFIG" --buildsrpm \