From 6c546fa257ba5de1ff1cf6128d25cc8ccb165c9c Mon Sep 17 00:00:00 2001 From: Aleksandar Todorov Date: Mon, 15 Feb 2021 11:08:10 +0200 Subject: [PATCH] Schutzbot: Start building & testing on aarch64 for RHEL/CentOS For now we're testing only on released streams in AWS because we don't have aarch64 support in PSI. --- Schutzfile | 4 +- schutzbot/Jenkinsfile | 98 +++++++++++++++++++++++++++++++++++++++ test/cases/image_tests.sh | 8 +++- 3 files changed, 107 insertions(+), 3 deletions(-) diff --git a/Schutzfile b/Schutzfile index dae9e5566..0b9f37463 100644 --- a/Schutzfile +++ b/Schutzfile @@ -9,7 +9,7 @@ "rhel-8.3": { "dependencies": { "osbuild": { - "commit": "6f1350d72d210767062a8e346e1472305703686b" + "commit": "e4e527b5b7cdf8bb6e48a6ec3ace7d9d9b155bc0" } }, "dependants": { @@ -24,7 +24,7 @@ "centos-8": { "dependencies": { "osbuild": { - "commit": "6f1350d72d210767062a8e346e1472305703686b" + "commit": "e4e527b5b7cdf8bb6e48a6ec3ace7d9d9b155bc0" } } } diff --git a/schutzbot/Jenkinsfile b/schutzbot/Jenkinsfile index 86ccefb28..e3cf01e50 100644 --- a/schutzbot/Jenkinsfile +++ b/schutzbot/Jenkinsfile @@ -138,6 +138,20 @@ pipeline { } } } + stage('EL8 aarch64') { + agent { label "rhel8cloudbase && aarch64 && aws" } + environment { + AWS_CREDS = credentials('aws-credentials-osbuildci') + AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test') + RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production') + } + steps { + sh "schutzbot/ci_details.sh" + retry(3) { + sh "schutzbot/mockbuild.sh" + } + } + } stage('EL8.4') { agent { label "rhel84cloudbase && x86_64 && psi" } environment { @@ -165,6 +179,19 @@ pipeline { } } } + stage('CS8 aarch64') { + agent { label "cs8cloudbase && aarch64 && aws" } + environment { + AWS_CREDS = credentials('aws-credentials-osbuildci') + AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test') + } + steps { + sh "schutzbot/ci_details.sh" + retry(3) { + sh "schutzbot/mockbuild.sh" + } + } + } stage("Container build - x86_64") { when { expression { @@ -627,6 +654,27 @@ pipeline { } } } + stage('EL8 aarch64 Base') { + when { + expression { + return env.BUILD_CAUSE != 'cron'; + } + } + + agent { label "rhel8cloudbase && aarch64 && aws" } + environment { + TEST_TYPE = "base" + RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production') + } + steps { + run_tests('base') + } + post { + always { + preserve_logs('el8-aarch64-base') + } + } + } stage('EL8.4 Base') { agent { label "rhel84cloudbase && x86_64 && psi" } environment { @@ -786,6 +834,56 @@ pipeline { } } } + stage('CS8 aarch64 Base') { + when { + expression { + return env.BUILD_CAUSE != 'cron'; + } + } + + agent { label "cs8cloudbase && aarch64 && aws" } + environment { + TEST_TYPE = "base" + } + steps { + run_tests('base') + } + post { + always { + preserve_logs('cs8-aarch64-base') + } + } + } + stage('CS8 aarch64 Image') { + when { + expression { + return env.BUILD_CAUSE != 'cron'; + } + } + + agent { label "cs8cloudbase && aarch64 && aws" } + 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 = "centos-stream8" + } + steps { + run_tests('image') + } + post { + always { + preserve_logs('cs8-aarch64-image') + sh ( + label: "Run cloud cleaner just in case something failed", + script: "schutzbot/run_cloud_cleaner.sh" + ) + } + } + } } } } diff --git a/test/cases/image_tests.sh b/test/cases/image_tests.sh index 3d112097f..09910e908 100755 --- a/test/cases/image_tests.sh +++ b/test/cases/image_tests.sh @@ -9,6 +9,12 @@ WORKING_DIRECTORY=/usr/libexec/osbuild-composer IMAGE_TEST_CASE_RUNNER=/usr/libexec/osbuild-composer-test/osbuild-image-tests IMAGE_TEST_CASES_PATH=/usr/share/tests/osbuild-composer/manifests +# aarch64 machines in AWS don't supported nested KVM so we run only +# testing against cloud vendors, don't boot with qemu-kvm! +if [[ "${ARCH}" == "aarch64" ]]; then + IMAGE_TEST_CASE_RUNNER="${IMAGE_TEST_CASE_RUNNER} --disable-local-boot" +fi + PASSED_TESTS=() FAILED_TESTS=() @@ -88,7 +94,7 @@ cd $WORKING_DIRECTORY # Run each test case. for TEST_CASE in $(get_test_cases); do - run_test_case $IMAGE_TEST_CASE_RUNNER "$TEST_CASE" + run_test_case "$IMAGE_TEST_CASE_RUNNER" "$TEST_CASE" done # Print a report of the test results.