Fix branch variable in github scm
[releng/global-jjb.git] / .jjb-test / expected-xml / github-ciman-packer-merge-centos-mininet
index 9fb389f..020c951 100644 (file)
@@ -71,7 +71,7 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'.
         <hudson.model.StringParameterDefinition>
           <name>PACKER_VERSION</name>
           <description>Packer version to download and install.</description>
-          <defaultValue>1.0.2</defaultValue>
+          <defaultValue>1.1.1</defaultValue>
         </hudson.model.StringParameterDefinition>
       </parameterDefinitions>
     </hudson.model.ParametersDefinitionProperty>
@@ -88,7 +88,7 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
     </userRemoteConfigs>
     <branches>
       <hudson.plugins.git.BranchSpec>
-        <name>**</name>
+        <name>master</name>
       </hudson.plugins.git.BranchSpec>
     </branches>
     <excludedUsers/>
@@ -163,7 +163,7 @@ zxiiro</whitelist>
     </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
     <EnvInjectBuilder>
       <info>
-        <propertiesContent>PACKER_VERSION=1.0.2
+        <propertiesContent>PACKER_VERSION=1.1.1
 </propertiesContent>
       </info>
     </EnvInjectBuilder>
@@ -188,16 +188,14 @@ PACKER_VERSION=&quot;${PACKER_VERSION:-1.0.2}&quot;
 
 # Ensure we fail the job if any steps fail.
 set -eu -o pipefail
-# Default packer binary made available on the build image
-packer_bin=&quot;/usr/local/bin/packer.io&quot;
 
-if hash &quot;$packer_bin&quot; 2&gt;/dev/null; then
+if hash packer.io 2&gt;/dev/null; then
     echo &quot;packer.io command is available.&quot;
 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
-    wget &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&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/
     # rename packer to avoid conflict with binary in cracklib
@@ -275,7 +273,7 @@ exit 0
       <info>
         <propertiesContent>PACKER_PLATFORM=centos
 PACKER_TEMPLATE=mininet
-PACKER_VERSION=1.0.2
+PACKER_VERSION=1.1.1
 </propertiesContent>
       </info>
     </EnvInjectBuilder>
@@ -300,16 +298,14 @@ PACKER_VERSION=&quot;${PACKER_VERSION:-1.0.2}&quot;
 
 # Ensure we fail the job if any steps fail.
 set -eu -o pipefail
-# Default packer binary made available on the build image
-packer_bin=&quot;/usr/local/bin/packer.io&quot;
 
-if hash &quot;$packer_bin&quot; 2&gt;/dev/null; then
+if hash packer.io 2&gt;/dev/null; then
     echo &quot;packer.io command is available.&quot;
 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
-    wget &quot;https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip&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/
     # rename packer to avoid conflict with binary in cracklib
@@ -456,7 +452,7 @@ echo &quot;---&gt; create-netrc.sh&quot;
 # Ensure we fail the job if any steps fail.
 set -eu -o pipefail
 
-NEXUS_URL=&quot;${NEXUS_URL:-$NEXUSPROXY}&quot;
+NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
 CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
     -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
     -v x:username -o &quot;:&quot; -v x:password \
@@ -466,7 +462,7 @@ machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
 user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
 pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
 
-echo &quot;machine $machine login $user password $pass&quot; &gt; ~/.netrc
+echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
 </command>
         </hudson.tasks.Shell>
         <hudson.tasks.Shell>
@@ -582,7 +578,7 @@ then
 
     echo &quot;WARNING: Logging server not set&quot;
 else
-    NEXUS_URL=&quot;${NEXUS_URL:-$NEXUSPROXY}&quot;
+    NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
     NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
     BUILD_URL=&quot;${BUILD_URL}&quot;
 
@@ -654,5 +650,14 @@ rm ~/.netrc
       <user>test-credential</user>
     </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
     <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
+    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
+      <managedFiles>
+        <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
+          <fileId>npmrc</fileId>
+          <targetLocation>$HOME/.npmrc</targetLocation>
+          <variable/>
+        </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
+      </managedFiles>
+    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
   </buildWrappers>
 </project>