Read vCenter credentials for Schutzbot & document them

This commit is contained in:
Alexander Todorov 2020-08-10 12:20:25 +03:00 committed by Tom Gundersen
parent 9cce43d384
commit dcee05d8b6
3 changed files with 25 additions and 1 deletions

View file

@ -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'

View file

@ -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.

View file

@ -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