Correctly evaluate UPDATE_CLOUD_IMAGE
While trying to get a clean packer build on an AWS based Jenkins I kept
running into the packer job failing. Digging into the code and turning
on debugging allowed me to spot that
if [[ ${UPDATE_CLOUD_IMAGE} ]]; then
Was translating to
[[ -n false ]]
During runs where $UPDATE_CLOUD_IMAGE wasn't set. This seemed strange to
me and then looking a bit further I realized that the boolean variable
in Jenkins is converting to a string ENV var of either 'true' or 'false'
depending the set. This means for the if statement to properly execute
it must evaluate as a string comparison as the variable is not actually
a boolean.
Change-Id: Ie98b51eb22412705c8c264b61be3c76b4e5ff985
Issue: RELENG-2985
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>