Update merge job to work with common-packer 14/8314/4
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Jan 2018 18:01:59 +0000 (13:01 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 10 Jan 2018 16:54:22 +0000 (11:54 -0500)
This patch requires that projects upgrading to the next global-jjb
release to now require common-packer.

Change-Id: I4d85452801e4eff78f33b86afba4c7d23dd3d678
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-java-builder
.jjb-test/expected-xml/gerrit-ciman-packer-merge-centos-mininet
.jjb-test/expected-xml/gerrit-ciman-packer-merge-ubuntu1604-java-builder
.jjb-test/expected-xml/gerrit-ciman-packer-merge-ubuntu1604-mininet
.jjb-test/expected-xml/github-ciman-packer-merge-centos-java-builder
.jjb-test/expected-xml/github-ciman-packer-merge-centos-mininet
.jjb-test/expected-xml/github-ciman-packer-merge-ubuntu1604-java-builder
.jjb-test/expected-xml/github-ciman-packer-merge-ubuntu1604-mininet
shell/packer-build.sh

index a6cdee4..a1d15ea 100644 (file)
@@ -391,16 +391,22 @@ PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
 mkdir -p &quot;$PACKER_LOGS_DIR&quot;
 export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
 
+# Prioritize the project's own version of vars if available
+platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
+    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+fi
+
 cd packer
-export PACKER_LOG=&quot;yes&quot; &amp;&amp; \
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot; &amp;&amp; \
-                 packer.io build -color=false \
-                        -var-file=&quot;$CLOUDENV&quot; \
-                        -var-file=&quot;../packer/vars/$PACKER_PLATFORM.json&quot; \
-                        &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;
+export PACKER_LOG=&quot;yes&quot;
+export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
+packer.io build -color=false \
+    -var-file=&quot;$CLOUDENV&quot; \
+    -var-file=&quot;$platform_file&quot; \
+    &quot;templates/$PACKER_TEMPLATE.json&quot;
 
 # Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;)
+mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
 
 # Split public/private clouds logs
 for cloud in &quot;${clouds[@]}&quot;; do
index 37c4297..a2d8e53 100644 (file)
@@ -391,16 +391,22 @@ PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
 mkdir -p &quot;$PACKER_LOGS_DIR&quot;
 export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
 
+# Prioritize the project's own version of vars if available
+platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
+    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+fi
+
 cd packer
-export PACKER_LOG=&quot;yes&quot; &amp;&amp; \
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot; &amp;&amp; \
-                 packer.io build -color=false \
-                        -var-file=&quot;$CLOUDENV&quot; \
-                        -var-file=&quot;../packer/vars/$PACKER_PLATFORM.json&quot; \
-                        &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;
+export PACKER_LOG=&quot;yes&quot;
+export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
+packer.io build -color=false \
+    -var-file=&quot;$CLOUDENV&quot; \
+    -var-file=&quot;$platform_file&quot; \
+    &quot;templates/$PACKER_TEMPLATE.json&quot;
 
 # Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;)
+mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
 
 # Split public/private clouds logs
 for cloud in &quot;${clouds[@]}&quot;; do
index 27ec990..5571df8 100644 (file)
@@ -391,16 +391,22 @@ PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
 mkdir -p &quot;$PACKER_LOGS_DIR&quot;
 export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
 
+# Prioritize the project's own version of vars if available
+platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
+    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+fi
+
 cd packer
-export PACKER_LOG=&quot;yes&quot; &amp;&amp; \
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot; &amp;&amp; \
-                 packer.io build -color=false \
-                        -var-file=&quot;$CLOUDENV&quot; \
-                        -var-file=&quot;../packer/vars/$PACKER_PLATFORM.json&quot; \
-                        &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;
+export PACKER_LOG=&quot;yes&quot;
+export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
+packer.io build -color=false \
+    -var-file=&quot;$CLOUDENV&quot; \
+    -var-file=&quot;$platform_file&quot; \
+    &quot;templates/$PACKER_TEMPLATE.json&quot;
 
 # Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;)
+mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
 
 # Split public/private clouds logs
 for cloud in &quot;${clouds[@]}&quot;; do
index 305d010..19656c5 100644 (file)
@@ -391,16 +391,22 @@ PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
 mkdir -p &quot;$PACKER_LOGS_DIR&quot;
 export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
 
+# Prioritize the project's own version of vars if available
+platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
+    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+fi
+
 cd packer
-export PACKER_LOG=&quot;yes&quot; &amp;&amp; \
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot; &amp;&amp; \
-                 packer.io build -color=false \
-                        -var-file=&quot;$CLOUDENV&quot; \
-                        -var-file=&quot;../packer/vars/$PACKER_PLATFORM.json&quot; \
-                        &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;
+export PACKER_LOG=&quot;yes&quot;
+export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
+packer.io build -color=false \
+    -var-file=&quot;$CLOUDENV&quot; \
+    -var-file=&quot;$platform_file&quot; \
+    &quot;templates/$PACKER_TEMPLATE.json&quot;
 
 # Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;)
+mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
 
 # Split public/private clouds logs
 for cloud in &quot;${clouds[@]}&quot;; do
index bd5f21b..df8f3cc 100644 (file)
@@ -345,16 +345,22 @@ PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
 mkdir -p &quot;$PACKER_LOGS_DIR&quot;
 export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
 
+# Prioritize the project's own version of vars if available
+platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
+    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+fi
+
 cd packer
-export PACKER_LOG=&quot;yes&quot; &amp;&amp; \
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot; &amp;&amp; \
-                 packer.io build -color=false \
-                        -var-file=&quot;$CLOUDENV&quot; \
-                        -var-file=&quot;../packer/vars/$PACKER_PLATFORM.json&quot; \
-                        &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;
+export PACKER_LOG=&quot;yes&quot;
+export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
+packer.io build -color=false \
+    -var-file=&quot;$CLOUDENV&quot; \
+    -var-file=&quot;$platform_file&quot; \
+    &quot;templates/$PACKER_TEMPLATE.json&quot;
 
 # Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;)
+mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
 
 # Split public/private clouds logs
 for cloud in &quot;${clouds[@]}&quot;; do
index 5450484..56e8039 100644 (file)
@@ -345,16 +345,22 @@ PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
 mkdir -p &quot;$PACKER_LOGS_DIR&quot;
 export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
 
+# Prioritize the project's own version of vars if available
+platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
+    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+fi
+
 cd packer
-export PACKER_LOG=&quot;yes&quot; &amp;&amp; \
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot; &amp;&amp; \
-                 packer.io build -color=false \
-                        -var-file=&quot;$CLOUDENV&quot; \
-                        -var-file=&quot;../packer/vars/$PACKER_PLATFORM.json&quot; \
-                        &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;
+export PACKER_LOG=&quot;yes&quot;
+export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
+packer.io build -color=false \
+    -var-file=&quot;$CLOUDENV&quot; \
+    -var-file=&quot;$platform_file&quot; \
+    &quot;templates/$PACKER_TEMPLATE.json&quot;
 
 # Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;)
+mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
 
 # Split public/private clouds logs
 for cloud in &quot;${clouds[@]}&quot;; do
index 75ee78b..b963d5c 100644 (file)
@@ -345,16 +345,22 @@ PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
 mkdir -p &quot;$PACKER_LOGS_DIR&quot;
 export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
 
+# Prioritize the project's own version of vars if available
+platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
+    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+fi
+
 cd packer
-export PACKER_LOG=&quot;yes&quot; &amp;&amp; \
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot; &amp;&amp; \
-                 packer.io build -color=false \
-                        -var-file=&quot;$CLOUDENV&quot; \
-                        -var-file=&quot;../packer/vars/$PACKER_PLATFORM.json&quot; \
-                        &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;
+export PACKER_LOG=&quot;yes&quot;
+export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
+packer.io build -color=false \
+    -var-file=&quot;$CLOUDENV&quot; \
+    -var-file=&quot;$platform_file&quot; \
+    &quot;templates/$PACKER_TEMPLATE.json&quot;
 
 # Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;)
+mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
 
 # Split public/private clouds logs
 for cloud in &quot;${clouds[@]}&quot;; do
index 5aec854..beff211 100644 (file)
@@ -345,16 +345,22 @@ PACKER_BUILD_LOG=&quot;$PACKER_LOGS_DIR/packer-build.log&quot;
 mkdir -p &quot;$PACKER_LOGS_DIR&quot;
 export PATH=&quot;${WORKSPACE}/bin:$PATH&quot;
 
+# Prioritize the project's own version of vars if available
+platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+if [ -f &quot;$PACKER_PLATFORM&quot; ]; then
+    platform_file=&quot;vars/$PACKER_PLATFORM.json&quot;
+fi
+
 cd packer
-export PACKER_LOG=&quot;yes&quot; &amp;&amp; \
-export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot; &amp;&amp; \
-                 packer.io build -color=false \
-                        -var-file=&quot;$CLOUDENV&quot; \
-                        -var-file=&quot;../packer/vars/$PACKER_PLATFORM.json&quot; \
-                        &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;
+export PACKER_LOG=&quot;yes&quot;
+export PACKER_LOG_PATH=&quot;$PACKER_BUILD_LOG&quot;
+packer.io build -color=false \
+    -var-file=&quot;$CLOUDENV&quot; \
+    -var-file=&quot;$platform_file&quot; \
+    &quot;templates/$PACKER_TEMPLATE.json&quot;
 
 # Retrive the list of cloud providers
-mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;../packer/templates/$PACKER_TEMPLATE.json&quot;)
+mapfile -t clouds &lt; &lt;(jq -r '.builders[].name' &quot;templates/$PACKER_TEMPLATE.json&quot;)
 
 # Split public/private clouds logs
 for cloud in &quot;${clouds[@]}&quot;; do
index e730545..177bb1c 100644 (file)
@@ -22,16 +22,22 @@ PACKER_BUILD_LOG="$PACKER_LOGS_DIR/packer-build.log"
 mkdir -p "$PACKER_LOGS_DIR"
 export PATH="${WORKSPACE}/bin:$PATH"
 
+# Prioritize the project's own version of vars if available
+platform_file="vars/$PACKER_PLATFORM.json"
+if [ -f "$PACKER_PLATFORM" ]; then
+    platform_file="vars/$PACKER_PLATFORM.json"
+fi
+
 cd packer
-export PACKER_LOG="yes" && \
-export PACKER_LOG_PATH="$PACKER_BUILD_LOG" && \
-                 packer.io build -color=false \
-                        -var-file="$CLOUDENV" \
-                        -var-file="../packer/vars/$PACKER_PLATFORM.json" \
-                        "../packer/templates/$PACKER_TEMPLATE.json"
+export PACKER_LOG="yes"
+export PACKER_LOG_PATH="$PACKER_BUILD_LOG"
+packer.io build -color=false \
+    -var-file="$CLOUDENV" \
+    -var-file="$platform_file" \
+    "templates/$PACKER_TEMPLATE.json"
 
 # Retrive the list of cloud providers
-mapfile -t clouds < <(jq -r '.builders[].name' "../packer/templates/$PACKER_TEMPLATE.json")
+mapfile -t clouds < <(jq -r '.builders[].name' "templates/$PACKER_TEMPLATE.json")
 
 # Split public/private clouds logs
 for cloud in "${clouds[@]}"; do