packer should validate only .json files
[releng/global-jjb.git] / 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" && \