Not having any openstack clouds defined is not a failure condition for
the config management. We already support skipping configuration (the
merge job) if there isn't a clouds config, but for some reason our
verify is trying to force that. This fixes the problem.
Change-Id: Ic48b91ef07808403b6214c6272bcd930e21a0af8
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
--- /dev/null
+---
+fixes:
+ - |
+ When evaluating jenkins-config management changes, if a system does not have
+ an openstack cloud defined, we should not fail the job. Instead we now
+ just skip that configuration and verification
}
echo "Verifying that cloud has a master configuration file"
}
echo "Verifying that cloud has a master configuration file"
-for cloud in jenkins-config/clouds/openstack/*; do
- if [[ -f $cloud/cloud.cfg ]]; then
- # Get the OS_CLOUD variable from cloud config
- if ! os_cloud=$(grep -E "^OS_CLOUD=" "$cloud/cloud.cfg" | cut -d'=' -f2); then
- os_cloud="vex"
+if [[ -d jenkins-config/clouds/openstack ]]; then
+ for cloud in jenkins-config/clouds/openstack/*; do
+ if [[ -f $cloud/cloud.cfg ]]; then
+ # Get the OS_CLOUD variable from cloud config
+ if ! os_cloud=$(grep -E "^OS_CLOUD=" "$cloud/cloud.cfg" | cut -d'=' -f2); then
+ os_cloud="vex"
+ fi
+ OS_CLOUD=$os_cloud verify_images "$cloud"
+ else
+ echo "ERROR: No cloud.cfg for $cloud"
+ error=true
- OS_CLOUD=$os_cloud verify_images "$cloud"
- else
- echo "ERROR: No cloud.cfg for $cloud"
- error=true
- fi
-done