diff --git a/schutzbot/Jenkinsfile b/schutzbot/Jenkinsfile index ec6cd20fa..9f8970e3c 100644 --- a/schutzbot/Jenkinsfile +++ b/schutzbot/Jenkinsfile @@ -132,6 +132,7 @@ pipeline { AWS_CREDS = credentials('aws-credentials-osbuildci') AZURE_CREDS = credentials('azure') OPENSTACK_CREDS = credentials("psi-openstack-creds") + VCENTER_CREDS = credentials('vmware-vcenter-credentials') } steps { unstash 'fedora31' @@ -180,6 +181,7 @@ pipeline { AWS_CREDS = credentials('aws-credentials-osbuildci') AZURE_CREDS = credentials('azure') OPENSTACK_CREDS = credentials("psi-openstack-creds") + VCENTER_CREDS = credentials('vmware-vcenter-credentials') } steps { unstash 'fedora32' @@ -232,6 +234,7 @@ pipeline { AZURE_CREDS = credentials('azure') OPENSTACK_CREDS = credentials("psi-openstack-creds") RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production') + VCENTER_CREDS = credentials('vmware-vcenter-credentials') } steps { unstash 'rhel8cdn' @@ -285,6 +288,7 @@ pipeline { AZURE_CREDS = credentials('azure') OPENSTACK_CREDS = credentials("psi-openstack-creds") RHN_REGISTRATION_SCRIPT = credentials('rhn-register-script-production-beta') + VCENTER_CREDS = credentials('vmware-vcenter-credentials') } steps { unstash 'rhel83' diff --git a/schutzbot/run_image_tests.sh b/schutzbot/run_image_tests.sh index febc7e163..38712ae33 100755 --- a/schutzbot/run_image_tests.sh +++ b/schutzbot/run_image_tests.sh @@ -57,7 +57,8 @@ run_test_case () { # /dev/null if the variable is undefined. AZURE_CREDS=${AZURE_CREDS-/dev/null} 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}" + VCENTER_CREDS=${VCENTER_CREDS-/dev/null} + TEST_CMD="env $(cat $AZURE_CREDS $OPENSTACK_CREDS $VCENTER_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. diff --git a/test/README.md b/test/README.md index 213ecef5e..bd47265fd 100644 --- a/test/README.md +++ b/test/README.md @@ -100,6 +100,25 @@ The following environment variables are required - `OS_DOMAIN_NAME` +### Setting up VMware vCenter upload tests + +The following environment variables are required + +- `GOVMOMI_URL` - vCenter hostname +- `GOVMOMI_USERNAME` +- `GOVMOMI_PASSWORD` +- `GOVMOMI_DATACENTER` +- `GOVMOMI_CLUSTER` +- `GOVMOMI_NETWORK` +- `GOVMOMI_DATASTORE` +- `GOVMOMI_FOLDER` +- `GOVMOMI_INSECURE` - value of 1 will skip checking SSL certificates + +**WARNING:** when configuring the credentials for Schutzbot we've experienced +an issue where the first line in the credentials file gets lost resulting in +incomplete credentials. The work-around is to define a dummy ENV variable on +the first line! + ## Notes on asserts and comparing expected values When comparing for expected values in test functions you should use the