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:
parent
0469be7a22
commit
b136332c7f
2 changed files with 6 additions and 9 deletions
8
schutzbot/Jenkinsfile
vendored
8
schutzbot/Jenkinsfile
vendored
|
|
@ -131,7 +131,7 @@ pipeline {
|
||||||
TEST_TYPE = "image"
|
TEST_TYPE = "image"
|
||||||
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
||||||
AZURE_CREDS = credentials('azure')
|
AZURE_CREDS = credentials('azure')
|
||||||
OPENSTACK_CREDS = credentials("psi-openstack-clouds-yaml")
|
OPENSTACK_CREDS = credentials("psi-openstack-creds")
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
unstash 'fedora31'
|
unstash 'fedora31'
|
||||||
|
|
@ -179,7 +179,7 @@ pipeline {
|
||||||
TEST_TYPE = "image"
|
TEST_TYPE = "image"
|
||||||
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
||||||
AZURE_CREDS = credentials('azure')
|
AZURE_CREDS = credentials('azure')
|
||||||
OPENSTACK_CREDS = credentials("psi-openstack-clouds-yaml")
|
OPENSTACK_CREDS = credentials("psi-openstack-creds")
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
unstash 'fedora32'
|
unstash 'fedora32'
|
||||||
|
|
@ -230,7 +230,7 @@ pipeline {
|
||||||
TEST_TYPE = "image"
|
TEST_TYPE = "image"
|
||||||
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
||||||
AZURE_CREDS = credentials('azure')
|
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')
|
RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production')
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
|
@ -283,7 +283,7 @@ pipeline {
|
||||||
TEST_TYPE = "image"
|
TEST_TYPE = "image"
|
||||||
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
||||||
AZURE_CREDS = credentials('azure')
|
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')
|
RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production-beta')
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,8 @@ run_test_case () {
|
||||||
# support aarch64), therefore the following line sets AZURE_CREDS to
|
# support aarch64), therefore the following line sets AZURE_CREDS to
|
||||||
# /dev/null if the variable is undefined.
|
# /dev/null if the variable is undefined.
|
||||||
AZURE_CREDS=${AZURE_CREDS-/dev/null}
|
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
|
# Run the test and add the test name to the list of passed or failed
|
||||||
# tests depending on the result.
|
# 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
|
sudo dnf -y install osbuild-composer-tests
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare the OpenStack login credentials.
|
|
||||||
mkdir -p ~/.config/openstack
|
|
||||||
cp $OPENSTACK_CREDS ~/.config/openstack/clouds.yaml
|
|
||||||
|
|
||||||
# Change to the working directory.
|
# Change to the working directory.
|
||||||
cd $WORKING_DIRECTORY
|
cd $WORKING_DIRECTORY
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue