From 2adf8e660fb25165c2c179dca458ff911997b758 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Tue, 29 Sep 2020 14:15:58 +0300 Subject: [PATCH] tests: Use aws-credentials-osbuild-image-test in CI --- schutzbot/Jenkinsfile | 14 ++++++++++++++ schutzbot/run_image_tests.sh | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/schutzbot/Jenkinsfile b/schutzbot/Jenkinsfile index 294dfcf3f..803967816 100644 --- a/schutzbot/Jenkinsfile +++ b/schutzbot/Jenkinsfile @@ -44,6 +44,7 @@ pipeline { agent { label "f31cloudbase && x86_64 && aws" } environment { AWS_CREDS = credentials('aws-credentials-osbuildci') + AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test') } steps { sh "schutzbot/ci_details.sh" @@ -60,6 +61,7 @@ pipeline { agent { label "f32cloudbase && x86_64 && aws" } environment { AWS_CREDS = credentials('aws-credentials-osbuildci') + AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test') } steps { sh "schutzbot/ci_details.sh" @@ -76,6 +78,7 @@ pipeline { agent { label "rhel8cloudbase && x86_64 && 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 { @@ -93,6 +96,7 @@ pipeline { agent { label "rhel83cloudbase && x86_64 && 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-beta') } steps { @@ -130,6 +134,7 @@ pipeline { 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') @@ -150,6 +155,7 @@ pipeline { environment { TEST_TYPE = "integration" AWS_CREDS = credentials('aws-credentials-osbuildci') + AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test') } steps { unstash 'fedora31' @@ -180,6 +186,7 @@ pipeline { 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') @@ -200,6 +207,7 @@ pipeline { environment { TEST_TYPE = "integration" AWS_CREDS = credentials('aws-credentials-osbuildci') + AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test') } steps { unstash 'fedora32' @@ -244,6 +252,7 @@ pipeline { 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") RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production') @@ -265,6 +274,7 @@ pipeline { environment { TEST_TYPE = "integration" 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 { @@ -299,6 +309,7 @@ pipeline { 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") RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production-beta') @@ -320,6 +331,7 @@ pipeline { environment { TEST_TYPE = "integration" AWS_CREDS = credentials('aws-credentials-osbuildci') + AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test') RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production-beta') } steps { @@ -454,6 +466,7 @@ pipeline { 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') @@ -475,6 +488,7 @@ pipeline { environment { TEST_TYPE = "integration" AWS_CREDS = credentials('aws-credentials-osbuildci') + AWS_IMAGE_TEST_CREDS = credentials('aws-credentials-osbuild-image-test') } steps { unstash 'rhel8nightly' diff --git a/schutzbot/run_image_tests.sh b/schutzbot/run_image_tests.sh index 31d7e14ca..ee5df034a 100755 --- a/schutzbot/run_image_tests.sh +++ b/schutzbot/run_image_tests.sh @@ -55,10 +55,11 @@ run_test_case () { # AZURE_CREDS might not be defined in all cases (e.g. Azure doesn't # support aarch64), therefore the following line sets AZURE_CREDS to # /dev/null if the variable is undefined. + AWS_CREDS=${AWS_IMAGE_TEST_CREDS-/dev/null} AZURE_CREDS=${AZURE_CREDS-/dev/null} OPENSTACK_CREDS=${OPENSTACK_CREDS-/dev/null} VCENTER_CREDS=${VCENTER_CREDS-/dev/null} - TEST_CMD="env $(cat "$AZURE_CREDS" "$OPENSTACK_CREDS" "$VCENTER_CREDS") BRANCH_NAME=${BRANCH_NAME-master} BUILD_ID=$BUILD_ID DISTRO_CODE=$DISTRO_CODE $TEST_RUNNER -test.v ${IMAGE_TEST_CASES_PATH}/${TEST_CASE_FILENAME}" + TEST_CMD="env $(cat "$AWS_CREDS" "$AZURE_CREDS" "$OPENSTACK_CREDS" "$VCENTER_CREDS") BRANCH_NAME=${BRANCH_NAME-master} BUILD_ID=$BUILD_ID DISTRO_CODE=$DISTRO_CODE $TEST_RUNNER -test.v ${IMAGE_TEST_CASES_PATH}/${TEST_CASE_FILENAME}" # Run the test and add the test name to the list of passed or failed # tests depending on the result.