X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;ds=sidebyside;f=.jjb-test%2Fexpected-xml%2Fgerrit-ciman-packer-merge-centos-mininet;h=37c42975bb3c22fb3cd19263046c64f1f40ef02f;hb=refs%2Fchanges%2F11%2F8311%2F4;hp=10091bf3abb6c5e1aeb6e807a996045b3542becb;hpb=ed320523c5e3c70a6f54cf9f57369f8305f9b342;p=releng%2Fglobal-jjb.git
diff --git a/.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-mininet b/.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-mininet
index 10091bf3..37c42975 100644
--- a/.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-mininet
+++ b/.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-mininet
@@ -151,7 +151,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'.
ANT
- packer/provision/mininet.sh
+ packer/provision/*.sh
+
+
+ ANT
+ packer/provision/mininet.yaml
ANT
@@ -268,17 +272,25 @@ mkdir -p "$PACKER_LOGS_DIR"
export PATH="${WORKSPACE}/bin:$PATH"
cd packer
-varfiles=(../packer/vars/*.json)
-templates=(../packer/templates/*.json)
+varfiles=(vars/*.json common-packer/vars/*.json)
+templates=(templates/*.json)
for varfile in "${varfiles[@]}"; do
+ # cloud-env.json is a file containing credentials which is pulled in via
+ # CLOUDENV variable so skip it here.
+ if [[ "$varfile" == *"cloud-env.json"* ]]; then
+ continue
+ fi
+
+ echo "-----> Testing varfile: $varfile"
for template in "${templates[@]}"; do
- export PACKER_LOG="yes" && \
- export PACKER_LOG_PATH="$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log" && \
- packer.io validate -var-file="$CLOUDENV" \
- -var-file="$varfile" "$template"
- if [ $? -ne 0 ]; then
- break
+ export PACKER_LOG="yes"
+ export PACKER_LOG_PATH="$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log"
+ if output=$(packer.io validate -var-file="$CLOUDENV" -var-file="$varfile" "$template"); then
+ echo "$template: $output"
+ else
+ echo "$template: $output"
+ exit 1
fi
done
done
@@ -388,7 +400,7 @@ export PACKER_LOG_PATH="$PACKER_BUILD_LOG" && \
"../packer/templates/$PACKER_TEMPLATE.json"
# Retrive the list of cloud providers
-clouds=($(jq -r '.builders[].name' "../packer/templates/$PACKER_TEMPLATE.json"))
+mapfile -t clouds < <(jq -r '.builders[].name' "../packer/templates/$PACKER_TEMPLATE.json")
# Split public/private clouds logs
for cloud in "${clouds[@]}"; do