From a1c66436bdfc4778b066e65ddaa1a228181becec Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Tue, 1 Aug 2017 14:31:17 +1000 Subject: Improve packer verify and build jobs - AGL uses multiple user credentials some of which are missing. JJB does not support setting "Ignore missing credentials" through JJB, therefore create a separate wrapper to fix the issue. - Improve the packer validation builder to exclude non-packer templates. Change-Id: I16524cbee14add2028d8c9e30b0f6c9315928031 Signed-off-by: Anil Belur --- jjb/global-macros.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'jjb/global-macros.yaml') diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index c73bd861..19a794b0 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -456,17 +456,19 @@ templates="../packer/templates/*" provision="../packer/provision/*.sh" for v in $varfiles; do - [[ "${v##*/}" =~ ^(cloud-env.*|README.*)$ ]] && continue + [[ ${v##*/} =~ ^(cloud-env.*|lava-env.*|README.md)$ ]] && continue for t in $templates; do + [[ ${t##*/} =~ ^(cloud-env.*|lava-env.*|README.md)$ ]] && continue export PACKER_LOG="yes" && \ export PACKER_LOG_PATH="packer-validate-${v##*/}-${t##*/}.log" && \ packer.io validate -var-file=$CLOUDENV \ -var-file=$v $t if [ $? -ne 0 ]; then - break + exit 1 fi done done + # todo: migrate to linting with shellcheck for p in $provision; do /bin/bash -n $p > provision-validate-${p##*/}.log 2>&1 done -- cgit 1.2.3-korg