X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;ds=inline;f=.jjb-test%2Fexpected-xml%2Fgithub-ciman-packer-verify;h=67b3ab644ff3bf061981be8ed387ef030441bc34;hb=aac0a15221c201d497ece89a9f0637433c3cc79b;hp=df45f685223a532d93128c8cb6298eecb233babc;hpb=3577c6f3469752c9ff64742002a5b235d774001b;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 df45f685..67b3ab64 100644
--- a/.jjb-test/expected-xml/github-ciman-packer-verify
+++ b/.jjb-test/expected-xml/github-ciman-packer-verify
@@ -9,8 +9,9 @@
build-vm
false
-
+
https://github.com/example-org/releng/ciman
+
@@ -71,7 +72,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,31 +89,25 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'.
- **
+ $sha1
-
-
false
- false
- true
- false
false
Default
-
- true
-
- false
- false
+
+
+
false
true
false
+ false
10
@@ -126,8 +121,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'.
false
+
+
^recheck$
+
false
true
true
@@ -151,7 +149,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 +170,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
@@ -182,12 +180,12 @@ if hash packer.io 2>/dev/null; then
else
echo "packer.io command not is available. Installing packer ..."
# Installs Hashicorp's Packer binary, required for verify & merge packer jobs
- pushd packer
+ pushd "${WORKSPACE}"
wget -nv "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip"
mkdir -p "${WORKSPACE}/bin"
- unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
+ unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d "${WORKSPACE}/bin/"
# rename packer to avoid conflict with binary in cracklib
- mv ${WORKSPACE}/bin/packer "${WORKSPACE}/bin/packer.io"
+ mv "${WORKSPACE}/bin/packer" "${WORKSPACE}/bin/packer.io"
popd
fi
@@ -214,17 +212,26 @@ 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. Also handle the case where a project
+ # has not vars/*.json file.
+ if [[ "$varfile" == *"cloud-env.json"* ]] || [[ "$varfile" == 'vars/*.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 +296,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.
@@ -526,5 +533,14 @@ rm ~/.netrc
test-credential
+
+
+
+ npmrc
+ $HOME/.npmrc
+
+
+
+