From bdd2db6da7821dc2b1c22e336cbc52fd950b7c23 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Tue, 1 Aug 2017 15:39:55 +1000 Subject: [PATCH] packer should validate only .json files Some of the projects could have README or .txt file which should be excluded, without which packer validate would fail. Change-Id: I6cc388a851ae2731a113d47e3719da7edf519c63 Signed-off-by: Anil Belur --- shell/packer-validate.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shell/packer-validate.sh b/shell/packer-validate.sh index e19c973a..e9f1a8f0 100644 --- a/shell/packer-validate.sh +++ b/shell/packer-validate.sh @@ -21,11 +21,10 @@ mkdir -p "$PACKER_LOGS_DIR" export PATH="${WORKSPACE}/bin:$PATH" cd packer -varfiles=(../packer/vars/*) -templates=(../packer/templates/*) +varfiles=(../packer/vars/*.json) +templates=(../packer/templates/*.json) for varfile in "${varfiles[@]}"; do - [[ "${varfile##*/}" =~ ^(cloud-env.*)$ ]] && continue for template in "${templates[@]}"; do export PACKER_LOG="yes" && \ export PACKER_LOG_PATH="$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log" && \ -- 2.16.6