Fix default platform location to common-packer
[releng/global-jjb.git] / .jjb-test / expected-xml / github-ciman-packer-merge-ubuntu1604-java-builder
index 75ee78b..12f74aa 100644 (file)
@@ -9,8 +9,9 @@
   <assignedNode>build-vm</assignedNode>
   <canRoam>false</canRoam>
   <properties>
-    <com.coravy.hudson.plugins.github.GithubProjectProperty>
+    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
       <projectUrl>https://github.com/example-org/releng/ciman</projectUrl>
+      <displayName/>
     </com.coravy.hudson.plugins.github.GithubProjectProperty>
     <hudson.model.ParametersDefinitionProperty>
       <parameterDefinitions>
@@ -91,28 +92,22 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
         <name>refs/heads/master</name>
       </hudson.plugins.git.BranchSpec>
     </branches>
-    <excludedUsers/>
-    <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
     <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-    <authorOrCommitter>false</authorOrCommitter>
-    <wipeOutWorkspace>true</wipeOutWorkspace>
-    <pruneBranches>false</pruneBranches>
     <remotePoll>false</remotePoll>
     <gitTool>Default</gitTool>
     <submoduleCfg class="list"/>
-    <relativeTargetDir/>
     <reference/>
     <gitConfigName/>
     <gitConfigEmail/>
-    <skipTag>true</skipTag>
-    <scmName/>
-    <useShallowClone>false</useShallowClone>
-    <ignoreNotifyCommit>false</ignoreNotifyCommit>
     <extensions>
+      <hudson.plugins.git.extensions.impl.BuildChooserSetting>
+        <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
+      </hudson.plugins.git.extensions.impl.BuildChooserSetting>
       <hudson.plugins.git.extensions.impl.SubmoduleOption>
         <disableSubmodules>false</disableSubmodules>
         <recursiveSubmodules>true</recursiveSubmodules>
         <trackingSubmodules>false</trackingSubmodules>
+        <parentCredentials>false</parentCredentials>
         <reference/>
         <timeout>10</timeout>
       </hudson.plugins.git.extensions.impl.SubmoduleOption>
@@ -138,8 +133,11 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
 tykeal
 zxiiro</whitelist>
       <orgslist>example-org</orgslist>
+      <whiteListLabels/>
+      <blackListLabels/>
       <cron/>
       <triggerPhrase>^remerge$</triggerPhrase>
+      <skipBuildPhrase/>
       <onlyTriggerPhrase>true</onlyTriggerPhrase>
       <useGitHubHooks>true</useGitHubHooks>
       <permitAll>false</permitAll>
@@ -194,12 +192,12 @@ if hash packer.io 2&gt;/dev/null; then
 else
     echo &quot;packer.io command not is available. Installing packer ...&quot;
     # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd packer
+    pushd &quot;${WORKSPACE}&quot;
     wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
     mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d ${WORKSPACE}/bin/
+    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
     # rename packer to avoid conflict with binary in cracklib
-    mv ${WORKSPACE}/bin/packer &quot;${WORKSPACE}/bin/packer.io&quot;
+    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
     popd
 fi
 
@@ -231,8 +229,9 @@ templates=(templates/*.json)
 
 for varfile in &quot;${varfiles[@]}&quot;; do
     # cloud-env.json is a file containing credentials which is pulled in via
-    # CLOUDENV variable so skip it here.
-    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]]; then
+    # CLOUDENV variable so skip it here. Also handle the case where a project
+    # has not vars/*.json file.
+    if [[ &quot;$varfile&quot; == *&quot;cloud-env.json&quot;* ]] || [[ &quot;$varfile&quot; == 'vars/*.json' ]]; then
         continue
     fi
 
@@ -312,12 +311,12 @@ if hash packer.io 2&gt;/dev/null; then
 else
     echo &quot;packer.io command not is available. Installing packer ...&quot;
     # Installs Hashicorp's Packer binary, required for verify &amp; merge packer jobs
-    pushd packer
+    pushd &quot;${WORKSPACE}&quot;
     wget -nv &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&quot;
     mkdir -p &quot;${WORKSPACE}/bin&quot;
-    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d ${WORKSPACE}/bin/
+    unzip &quot;packer_${PACKER_VERSION}_linux_amd64.zip&quot; -d &quot;${WORKSPACE}/bin/&quot;
     # rename packer to avoid conflict with binary in cracklib
-    mv ${WORKSPACE}/bin/packer &quot;${WORKSPACE}/bin/packer.io&quot;
+    mv &quot;${WORKSPACE}/bin/packer&quot; &quot;${WORKSPACE}/bin/packer.io&quot;
     popd
 fi
 
@@ -345,16 +344,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;common-packer/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
@@ -645,7 +650,7 @@ rm ~/.netrc
   <buildWrappers>
     <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
     <hudson.plugins.build__timeout.BuildTimeoutWrapper>
-      <timeoutMinutes>45</timeoutMinutes>
+      <timeoutMinutes>90</timeoutMinutes>
       <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
       <failBuild>true</failBuild>
       <writingDescription>false</writingDescription>