From: Anil Belur Date: Tue, 1 Aug 2017 05:39:55 +0000 (+1000) Subject: packer should validate only .json files X-Git-Tag: v0.6.0~2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F5706%2F2;p=releng%2Fglobal-jjb.git 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 --- 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" && \