packer should validate only .json files 06/5706/2
authorAnil Belur <abelur@linuxfoundation.org>
Tue, 1 Aug 2017 05:39:55 +0000 (15:39 +1000)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 2 Aug 2017 18:49:02 +0000 (18:49 +0000)
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 <abelur@linuxfoundation.org>
shell/packer-validate.sh

index e19c973..e9f1a8f 100644 (file)
@@ -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" && \