Provide OpenStack environment for image tests

in the same way this is done for Azure we read the OS credentials
and provide them as ENV variables for the test

Note: uses `psi-openstack-creds` and not `psi-openstack-clouds-yaml`
which is a yaml file.
This commit is contained in:
Alexander Todorov 2020-08-03 13:05:35 +03:00 committed by Tom Gundersen
parent 0469be7a22
commit b136332c7f
2 changed files with 6 additions and 9 deletions

View file

@ -131,7 +131,7 @@ pipeline {
TEST_TYPE = "image"
AWS_CREDS = credentials('aws-credentials-osbuildci')
AZURE_CREDS = credentials('azure')
OPENSTACK_CREDS = credentials("psi-openstack-clouds-yaml")
OPENSTACK_CREDS = credentials("psi-openstack-creds")
}
steps {
unstash 'fedora31'
@ -179,7 +179,7 @@ pipeline {
TEST_TYPE = "image"
AWS_CREDS = credentials('aws-credentials-osbuildci')
AZURE_CREDS = credentials('azure')
OPENSTACK_CREDS = credentials("psi-openstack-clouds-yaml")
OPENSTACK_CREDS = credentials("psi-openstack-creds")
}
steps {
unstash 'fedora32'
@ -230,7 +230,7 @@ pipeline {
TEST_TYPE = "image"
AWS_CREDS = credentials('aws-credentials-osbuildci')
AZURE_CREDS = credentials('azure')
OPENSTACK_CREDS = credentials("psi-openstack-clouds-yaml")
OPENSTACK_CREDS = credentials("psi-openstack-creds")
RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production')
}
steps {
@ -283,7 +283,7 @@ pipeline {
TEST_TYPE = "image"
AWS_CREDS = credentials('aws-credentials-osbuildci')
AZURE_CREDS = credentials('azure')
OPENSTACK_CREDS = credentials("psi-openstack-clouds-yaml")
OPENSTACK_CREDS = credentials("psi-openstack-creds")
RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production-beta')
}
steps {

View file

@ -56,7 +56,8 @@ run_test_case () {
# support aarch64), therefore the following line sets AZURE_CREDS to
# /dev/null if the variable is undefined.
AZURE_CREDS=${AZURE_CREDS-/dev/null}
TEST_CMD="env $(cat $AZURE_CREDS) $TEST_RUNNER -test.v ${IMAGE_TEST_CASES_PATH}/${TEST_CASE_FILENAME}"
OPENSTACK_CREDS=${OPENSTACK_CREDS-/dev/null}
TEST_CMD="env $(cat $AZURE_CREDS $OPENSTACK_CREDS) $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.
@ -75,10 +76,6 @@ if ! rpm -qi osbuild-composer-tests > /dev/null 2>&1; then
sudo dnf -y install osbuild-composer-tests
fi
# Prepare the OpenStack login credentials.
mkdir -p ~/.config/openstack
cp $OPENSTACK_CREDS ~/.config/openstack/clouds.yaml
# Change to the working directory.
cd $WORKING_DIRECTORY