X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;ds=inline;f=.jjb-test%2Fexpected-xml%2Fgithub-ciman-packer-verify;h=4c4436eaab2f4351036c05bdabff05ad0969dd8f;hb=048fe0b4d7fdd4d11d1d0fdcbc154b31089b3ac1;hp=e69dfc11f7ced3b49876e990fe9d11ad2d04881a;hpb=9d3f891844ffaacec7ada4a22df0b3e95caadae4;p=releng%2Fglobal-jjb.git
diff --git a/.jjb-test/expected-xml/github-ciman-packer-verify b/.jjb-test/expected-xml/github-ciman-packer-verify
index e69dfc11..4c4436ea 100644
--- a/.jjb-test/expected-xml/github-ciman-packer-verify
+++ b/.jjb-test/expected-xml/github-ciman-packer-verify
@@ -71,7 +71,7 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'.
PACKER_VERSION
Packer version to download and install.
- 1.1.1
+ 1.1.3
@@ -88,7 +88,7 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'.
- master
+ $sha1
@@ -151,7 +151,7 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'.
- PACKER_VERSION=1.1.1
+ PACKER_VERSION=1.1.3
@@ -172,7 +172,7 @@ echo "---> packer-install.sh"
# $PACKER_VERSION : Define a packer version passed as job paramter
-PACKER_VERSION="${PACKER_VERSION:-1.0.2}"
+PACKER_VERSION="${PACKER_VERSION:-1.1.3}"
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
@@ -214,17 +214,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
@@ -289,9 +297,9 @@ SAR_DIR="$WORKSPACE/archives/sar-reports"
mkdir -p "$SAR_DIR"
cp "$SYSSTAT_PATH/"* "$_"
# convert sar data to ascii format
-while IFS="" read -r s
+while IFS="" read -r sarfilenum
do
- [ -f "$s" ] && LC_TIME=POSIX sar -A -f "$s" > "$SAR_DIR/sar${s//[!0-9]/}"
+ [ -f "$sarfilenum" ] && LC_TIME=POSIX sar -A -f "$sarfilenum" > "$SAR_DIR/sar${sarfilenum//[!0-9]/}"
done < <(find "$SYSSTAT_PATH" -name "sa[0-9]*" || true)
# DON'T fail build if script fails.