X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;ds=sidebyside;f=.jjb-test%2Fexpected-xml%2Fgithub-ciman-packer-merge-centos-mininet;h=5450484d0f7453e1bb734e04df0242b5abfcdf21;hb=refs%2Fchanges%2F11%2F8311%2F4;hp=9a1e8eacb4d3d468b0edfffbb682fc39883e0a53;hpb=6df0d5a717c1e3c33aae618b80382b491476cd54;p=releng%2Fglobal-jjb.git
diff --git a/.jjb-test/expected-xml/github-ciman-packer-merge-centos-mininet b/.jjb-test/expected-xml/github-ciman-packer-merge-centos-mininet
index 9a1e8eac..5450484d 100644
--- a/.jjb-test/expected-xml/github-ciman-packer-merge-centos-mininet
+++ b/.jjb-test/expected-xml/github-ciman-packer-merge-centos-mininet
@@ -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.0.2
+ 1.1.3
@@ -88,7 +88,7 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'.
- **
+ refs/heads/master
@@ -163,7 +163,7 @@ zxiiro
- PACKER_VERSION=1.0.2
+ PACKER_VERSION=1.1.3
@@ -184,7 +184,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
@@ -226,17 +226,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
@@ -273,7 +281,7 @@ exit 0
PACKER_PLATFORM=centos
PACKER_TEMPLATE=mininet
-PACKER_VERSION=1.0.2
+PACKER_VERSION=1.1.3
@@ -294,7 +302,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
@@ -346,7 +354,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
@@ -413,9 +421,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.
@@ -462,7 +470,7 @@ machine=$(echo "$NEXUS_URL" | awk -F/ '{print $3}')
user=$(echo "$CREDENTIAL" | cut -f1 -d:)
pass=$(echo "$CREDENTIAL" | cut -f2 -d:)
-echo "machine $machine login $user password $pass" > ~/.netrc
+echo "machine ${machine%:*} login $user password $pass" > ~/.netrc
@@ -650,5 +658,14 @@ rm ~/.netrc
test-credential
+
+
+
+ npmrc
+ $HOME/.npmrc
+
+
+
+