Drop public visibility for image when saving to Glance
CI user which is used to save images on cloud doesn't have an
access to make images public available, so let's drop this parameter
at all from cmd line.
Related-Prod: PROD-27995 (PROD:27995)
Change-Id: Ieefa0521ea299020f1612375572c1902acb8bfd0
diff --git a/packer-image-buid.groovy b/packer-image-buid.groovy
index ea02bde..3b48075 100644
--- a/packer-image-buid.groovy
+++ b/packer-image-buid.groovy
@@ -299,8 +299,7 @@
if (x.getName().endsWith('.qcow2')) {
_md5sum = sh(script: "cat ${x}.md5", returnStdout: true).trim().split()[0]
_property = "--property data=${dateTime} --property md5sum=${_md5sum} --property build='${env.BUILD_URL}' --container-format bare --disk-format qcow2"
- _cmdline = String.format("glance image-create --visibility " +
- "public %s --name '%s' --file %s", _property, imageName, x)
+ _cmdline = String.format("glance image-create %s --name '%s' --file %s", _property, imageName, x)
openstack.runOpenstackCommand(_cmdline, rcFile, openstackEnv)
}
}