Fix default platform location to common-packer
[releng/global-jjb.git] / .jjb-test / expected-xml / gerrit-maven-maven-verify-deps-master-mvn33-openjdk8
index 8903c2b..1db4186 100644 (file)
@@ -74,6 +74,11 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'.
 </description>
           <defaultValue>&lt;1.0.0</defaultValue>
         </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>M2_HOME</name>
+          <description>Maven selector to be used by shell scripts</description>
+          <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
+        </hudson.model.StringParameterDefinition>
         <hudson.model.StringParameterDefinition>
           <name>MAVEN_OPTS</name>
           <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
@@ -97,6 +102,11 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
 </description>
           <defaultValue>uuddlrlrba</defaultValue>
         </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>ARCHIVE_ARTIFACTS</name>
+          <description>Artifacts to archive to the logs server.</description>
+          <defaultValue/>
+        </hudson.model.StringParameterDefinition>
       </parameterDefinitions>
     </hudson.model.ParametersDefinitionProperty>
   </properties>
@@ -115,28 +125,22 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
         <name>refs/heads/$GERRIT_BRANCH</name>
       </hudson.plugins.git.BranchSpec>
     </branches>
-    <excludedUsers/>
-    <buildChooser class="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
     <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="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
+      </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>
@@ -253,7 +257,18 @@ set -eu -o pipefail
 
 REPOS_DIR=&quot;$WORKSPACE/.repos&quot;
 
-PATCHES=($(echo &quot;$GERRIT_EVENT_COMMENT_TEXT&quot; | grep 'recheck:' | awk -F: '{print $2}'))
+IFS=&quot; &quot; read -r -a PATCHES &lt;&lt;&lt; &quot;$(echo &quot;$GERRIT_EVENT_COMMENT_TEXT&quot; | grep 'recheck:' | awk -F: '{print $2}')&quot;
+
+# Workaround for git-review bug in v1.24
+# https://storyboard.openstack.org/#!/story/2001081
+set +u  # Allow unbound variables for virtualenv
+virtualenv --quiet &quot;/tmp/v/git-review&quot;
+# shellcheck source=/tmp/v/git-review/bin/activate disable=SC1091
+source &quot;/tmp/v/git-review/bin/activate&quot;
+pip install --quiet --upgrade pip
+pip install --quiet --upgrade git-review
+set -u
+# End git-review workaround
 
 projects=()
 for patch in $(echo &quot;${PATCHES[@]}&quot;); do
@@ -269,7 +284,10 @@ for patch in $(echo &quot;${PATCHES[@]}&quot;); do
     fi
 
     pushd &quot;$REPOS_DIR/$project&quot;
-    git remote add gerrit &quot;$GIT_URL/$project&quot;
+    # If remote gerrit already exists just make sure path is expected
+    if ! git remote add gerrit &quot;$GERRIT_URL/$project&quot; &gt; /dev/null 2&gt;&amp;1; then
+        git remote set-url gerrit &quot;$GERRIT_URL/$project&quot;
+    fi
     git review --cherrypick=&quot;$patch&quot;
     popd
 done
@@ -330,7 +348,7 @@ echo &quot;$MAVEN_OPTIONS&quot;
 set -e -o pipefail
 set +u
 
-PROJECTS=($(echo &quot;$DEPENDENCY_BUILD_ORDER&quot;))
+IFS=&quot; &quot; read -r -a PROJECTS &lt;&lt;&lt; &quot;$DEPENDENCY_BUILD_ORDER&quot;
 REPOS_DIR=&quot;$WORKSPACE/.repos&quot;
 
 export MAVEN_OPTS
@@ -344,7 +362,7 @@ for project in &quot;${PROJECTS[@]}&quot;; do
         -DskipTests=true \
         --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
         --settings &quot;$SETTINGS_FILE&quot; \
-        $MAVEN_PARAMS $MAVEN_OPTIONS
+        $MAVEN_OPTIONS $MAVEN_PARAMS
     popd
 done
 </command>
@@ -400,7 +418,7 @@ $MVN clean deploy \
     --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
     --settings &quot;$SETTINGS_FILE&quot; \
     -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
-    $MAVEN_PARAMS $MAVEN_OPTIONS
+    $MAVEN_OPTIONS $MAVEN_PARAMS
 </command>
     </hudson.tasks.Shell>
     <hudson.tasks.Shell>
@@ -448,11 +466,11 @@ exit 0
       <doNotResolveRelativePaths>false</doNotResolveRelativePaths>
       <pattern/>
     </hudson.plugins.findbugs.FindBugsPublisher>
-    <hudson.plugins.jacoco.JacocoPublisher>
+    <hudson.plugins.jacoco.JacocoPublisher plugin="jacoco">
       <execPattern>**/**.exec</execPattern>
       <classPattern>**/classes</classPattern>
       <sourcePattern>**/src/main/java</sourcePattern>
-      <changeBuildStatus/>
+      <changeBuildStatus>false</changeBuildStatus>
       <inclusionPattern/>
       <exclusionPattern>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</exclusionPattern>
       <maximumBranchCoverage>10</maximumBranchCoverage>
@@ -499,9 +517,9 @@ SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
 mkdir -p &quot;$SAR_DIR&quot;
 cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
 # convert sar data to ascii format
-while IFS=&quot;&quot; read -r s
+while IFS=&quot;&quot; read -r sarfilenum
 do
-    [ -f &quot;$s&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$s&quot; &gt; &quot;$SAR_DIR/sar${s//[!0-9]/}&quot;
+    [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
 done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
 
 # DON'T fail build if script fails.
@@ -538,7 +556,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 \
@@ -548,7 +566,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>
@@ -664,7 +682,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;
 
@@ -736,5 +754,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>