e02966680a73e9b22cf48d08e3fbb59418d73b0b
[releng/global-jjb.git] / .jjb-test / expected-xml / gerrit-maven-maven-clm-master
1 <?xml version="1.0" encoding="utf-8"?>
2 <project>
3   <jdk>openjdk8</jdk>
4   <actions/>
5   <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
6   <keepDependencies>false</keepDependencies>
7   <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
8   <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
9   <concurrentBuild>false</concurrentBuild>
10   <assignedNode>build-vm</assignedNode>
11   <canRoam>false</canRoam>
12   <properties>
13     <jenkins.model.BuildDiscarderProperty>
14       <strategy class="hudson.tasks.LogRotator">
15         <daysToKeep>30</daysToKeep>
16         <numToKeep>-1</numToKeep>
17         <artifactDaysToKeep>-1</artifactDaysToKeep>
18         <artifactNumToKeep>0</artifactNumToKeep>
19       </strategy>
20     </jenkins.model.BuildDiscarderProperty>
21     <hudson.model.ParametersDefinitionProperty>
22       <parameterDefinitions>
23         <hudson.model.StringParameterDefinition>
24           <name>PROJECT</name>
25           <description>Parameter to identify a Gerrit project. This is typically the
26 project repo path as exists in Gerrit.
27 For example: ofextensions/circuitsw
28 </description>
29           <defaultValue>releng/ciman</defaultValue>
30         </hudson.model.StringParameterDefinition>
31         <hudson.model.StringParameterDefinition>
32           <name>STREAM</name>
33           <description>Stream is often set to the same name as 'branch' but can
34 sometimes be used as a name representing a project's release code
35 name.
36 </description>
37           <defaultValue>master</defaultValue>
38         </hudson.model.StringParameterDefinition>
39         <hudson.model.StringParameterDefinition>
40           <name>GERRIT_PROJECT</name>
41           <description>Parameter to identify Gerrit project. This is typically the
42 project repo path as exists in Gerrit.
43 For example: ofextensions/circuitsw
44
45 Note that Gerrit will override this parameter automatically if a
46 job is triggered by Gerrit.
47 </description>
48           <defaultValue>releng/ciman</defaultValue>
49         </hudson.model.StringParameterDefinition>
50         <hudson.model.StringParameterDefinition>
51           <name>GERRIT_BRANCH</name>
52           <description>Parameter to identify a Gerrit branch.
53
54 Note that Gerrit will override this parameter automatically if a
55 job is triggered by Gerrit.
56 </description>
57           <defaultValue>master</defaultValue>
58         </hudson.model.StringParameterDefinition>
59         <hudson.model.StringParameterDefinition>
60           <name>GERRIT_REFSPEC</name>
61           <description>Parameter to identify a refspec when pulling from Gerrit.
62
63 Note that Gerrit will override this parameter automatically if a
64 job is triggered by Gerrit.
65 </description>
66           <defaultValue>refs/heads/master</defaultValue>
67         </hudson.model.StringParameterDefinition>
68         <hudson.model.StringParameterDefinition>
69           <name>LFTOOLS_VERSION</name>
70           <description>Version of lftools to install. Can be a specific version like
71 '0.6.0' or a PEP-440 definition.
72 https://www.python.org/dev/peps/pep-0440/
73 For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
74 </description>
75           <defaultValue>&lt;1.0.0</defaultValue>
76         </hudson.model.StringParameterDefinition>
77         <hudson.model.StringParameterDefinition>
78           <name>M2_HOME</name>
79           <description>Maven selector to be used by shell scripts</description>
80           <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33</defaultValue>
81         </hudson.model.StringParameterDefinition>
82         <hudson.model.StringParameterDefinition>
83           <name>MAVEN_OPTS</name>
84           <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
85 </description>
86           <defaultValue/>
87         </hudson.model.StringParameterDefinition>
88         <hudson.model.StringParameterDefinition>
89           <name>MAVEN_PARAMS</name>
90           <description>Maven parameters to pass to the mvn command.
91 </description>
92           <defaultValue/>
93         </hudson.model.StringParameterDefinition>
94         <hudson.model.StringParameterDefinition>
95           <name>MVN</name>
96           <description>Maven selector to be used by shell scripts</description>
97           <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
98         </hudson.model.StringParameterDefinition>
99         <hudson.model.StringParameterDefinition>
100           <name>STAGING_PROFILE_ID</name>
101           <description>Nexus staging profile ID.
102 </description>
103           <defaultValue>uuddlrlrba</defaultValue>
104         </hudson.model.StringParameterDefinition>
105         <hudson.model.StringParameterDefinition>
106           <name>ARCHIVE_ARTIFACTS</name>
107           <description>Artifacts to archive to the logs server.</description>
108           <defaultValue/>
109         </hudson.model.StringParameterDefinition>
110       </parameterDefinitions>
111     </hudson.model.ParametersDefinitionProperty>
112   </properties>
113   <scm class="hudson.plugins.git.GitSCM">
114     <configVersion>2</configVersion>
115     <userRemoteConfigs>
116       <hudson.plugins.git.UserRemoteConfig>
117         <name>origin</name>
118         <refspec>$GERRIT_REFSPEC</refspec>
119         <url>$GIT_URL/$PROJECT</url>
120         <credentialsId>test-credential</credentialsId>
121       </hudson.plugins.git.UserRemoteConfig>
122     </userRemoteConfigs>
123     <branches>
124       <hudson.plugins.git.BranchSpec>
125         <name>refs/heads/$GERRIT_BRANCH</name>
126       </hudson.plugins.git.BranchSpec>
127     </branches>
128     <excludedUsers/>
129     <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
130     <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
131     <authorOrCommitter>false</authorOrCommitter>
132     <wipeOutWorkspace>true</wipeOutWorkspace>
133     <pruneBranches>false</pruneBranches>
134     <remotePoll>false</remotePoll>
135     <gitTool>Default</gitTool>
136     <submoduleCfg class="list"/>
137     <relativeTargetDir/>
138     <reference/>
139     <gitConfigName/>
140     <gitConfigEmail/>
141     <skipTag>true</skipTag>
142     <scmName/>
143     <useShallowClone>false</useShallowClone>
144     <ignoreNotifyCommit>false</ignoreNotifyCommit>
145     <extensions>
146       <hudson.plugins.git.extensions.impl.SubmoduleOption>
147         <disableSubmodules>false</disableSubmodules>
148         <recursiveSubmodules>true</recursiveSubmodules>
149         <trackingSubmodules>false</trackingSubmodules>
150         <reference/>
151         <timeout>10</timeout>
152       </hudson.plugins.git.extensions.impl.SubmoduleOption>
153       <hudson.plugins.git.extensions.impl.WipeWorkspace/>
154     </extensions>
155   </scm>
156   <triggers class="vector">
157     <hudson.triggers.TimerTrigger>
158       <spec>H H * * 6</spec>
159     </hudson.triggers.TimerTrigger>
160     <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
161       <spec/>
162       <gerritProjects>
163         <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
164           <compareType>ANT</compareType>
165           <pattern>releng/ciman</pattern>
166           <branches>
167             <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
168               <compareType>ANT</compareType>
169               <pattern>**/master</pattern>
170             </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
171           </branches>
172           <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
173         </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
174       </gerritProjects>
175       <skipVote>
176         <onSuccessful>true</onSuccessful>
177         <onFailed>true</onFailed>
178         <onUnstable>true</onUnstable>
179         <onNotBuilt>true</onNotBuilt>
180       </skipVote>
181       <silentMode>false</silentMode>
182       <silentStartMode>false</silentStartMode>
183       <escapeQuotes>true</escapeQuotes>
184       <noNameAndEmailParameters>false</noNameAndEmailParameters>
185       <readableMessage>false</readableMessage>
186       <dependencyJobsNames/>
187       <notificationLevel/>
188       <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
189       <triggerConfigURL/>
190       <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
191       <triggerOnEvents>
192         <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
193           <commentAddedCommentContains>run-clm$</commentAddedCommentContains>
194         </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
195       </triggerOnEvents>
196       <buildStartMessage/>
197       <buildFailureMessage/>
198       <buildSuccessfulMessage/>
199       <buildUnstableMessage/>
200       <buildNotBuiltMessage/>
201       <buildUnsuccessfulFilepath/>
202       <customUrl/>
203       <serverName>test-server</serverName>
204     </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
205   </triggers>
206   <builders>
207     <hudson.tasks.Shell>
208       <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
209     </hudson.tasks.Shell>
210     <hudson.tasks.Maven>
211       <targets>--version</targets>
212       <properties/>
213       <mavenName>mvn33</mavenName>
214       <usePrivateRepository>false</usePrivateRepository>
215       <settings class="jenkins.mvn.DefaultSettingsProvider"/>
216       <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
217     </hudson.tasks.Maven>
218     <hudson.tasks.Shell>
219       <command>rm &quot;$HOME/.wgetrc&quot;</command>
220     </hudson.tasks.Shell>
221     <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
222       <managedFiles>
223         <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
224           <fileId>global-settings</fileId>
225           <targetLocation/>
226           <variable>GLOBAL_SETTINGS_FILE</variable>
227         </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
228         <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
229           <fileId>gerrit-maven-project-settings</fileId>
230           <targetLocation/>
231           <variable>SETTINGS_FILE</variable>
232         </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
233       </managedFiles>
234     </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
235     <hudson.tasks.Shell>
236       <command>#!/bin/bash
237 # SPDX-License-Identifier: EPL-1.0
238 ##############################################################################
239 # Copyright (c) 2017 The Linux Foundation and others.
240 #
241 # All rights reserved. This program and the accompanying materials
242 # are made available under the terms of the Eclipse Public License v1.0
243 # which accompanies this distribution, and is available at
244 # http://www.eclipse.org/legal/epl-v10.html
245 ##############################################################################
246
247 # This file contains a list of variables that are generally useful in many
248 # scripts. It is meant to be sourced in other scripts so that the variables can
249 # be called.
250
251 MAVEN_OPTIONS=&quot;$(echo --show-version \
252     --batch-mode \
253     -Djenkins \
254     -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
255     -Dmaven.repo.local=/tmp/r \
256     -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
257 echo &quot;$MAVEN_OPTIONS&quot;
258
259 #!/bin/bash
260 # SPDX-License-Identifier: EPL-1.0
261 ##############################################################################
262 # Copyright (c) 2017 The Linux Foundation and others.
263 #
264 # All rights reserved. This program and the accompanying materials
265 # are made available under the terms of the Eclipse Public License v1.0
266 # which accompanies this distribution, and is available at
267 # http://www.eclipse.org/legal/epl-v10.html
268 ##############################################################################
269
270 # This script builds a Maven project and deploys it into a staging repo which
271 # can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
272
273 # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
274 # Ensure we fail the job if any steps fail.
275 set -e -o pipefail
276 set +u
277
278 export MAVEN_OPTS
279
280 # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
281 # shellcheck disable=SC2086
282 $MVN clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index \
283     --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
284     --settings &quot;$SETTINGS_FILE&quot; \
285     -DaltDeploymentRepository=staging::default::file:&quot;$WORKSPACE&quot;/m2repo \
286     $MAVEN_OPTIONS $MAVEN_PARAMS
287 </command>
288     </hudson.tasks.Shell>
289     <hudson.tasks.Shell>
290       <command>#!/bin/bash
291 set +e  # DO NOT cause build failure if any of the rm calls fail.
292
293 rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
294
295 # In some cases we use the lf-provide-maven-settings macro to produce
296 # a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
297 # too if it exists.
298 rm &quot;$HOME/.netrc&quot;
299
300 # DO NOT fail build if any of the above lines fail.
301 exit 0
302 </command>
303     </hudson.tasks.Shell>
304     <hudson.tasks.Shell>
305       <command>find . -regex &quot;.*karaf/target&quot; | xargs rm -rf</command>
306     </hudson.tasks.Shell>
307     <com.sonatype.insight.ci.hudson.PreBuildScan plugin="sonatype-clm-ci">
308       <applicationSelectType>
309         <value>list</value>
310         <applicationId>gerrit-maven</applicationId>
311       </applicationSelectType>
312       <pathConfig>
313         <scanTargets/>
314         <moduleExcludes/>
315         <scanProperties/>
316       </pathConfig>
317       <failOnClmServerFailures>false</failOnClmServerFailures>
318       <stageId>build</stageId>
319       <username/>
320       <password/>
321     </com.sonatype.insight.ci.hudson.PreBuildScan>
322   </builders>
323   <publishers>
324     <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
325       <buildSteps>
326         <hudson.tasks.Shell>
327           <command>#!/bin/bash
328 # SPDX-License-Identifier: EPL-1.0
329 ##############################################################################
330 # Copyright (c) 2017 The Linux Foundation and others.
331 #
332 # All rights reserved. This program and the accompanying materials
333 # are made available under the terms of the Eclipse Public License v1.0
334 # which accompanies this distribution, and is available at
335 # http://www.eclipse.org/legal/epl-v10.html
336 ##############################################################################
337 echo &quot;---&gt; sysstat.sh&quot;
338 set +e  # DON'T fail build if script fails.
339
340 OS=$(facter operatingsystem)
341 case &quot;$OS&quot; in
342     Ubuntu)
343         SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
344
345         # Dont run the script when systat is not enabled by default
346         if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
347             exit 0
348         fi
349     ;;
350     CentOS|RedHat)
351         SYSSTAT_PATH=&quot;/var/log/sa&quot;
352     ;;
353     *)
354         # nothing to do
355         exit 0
356     ;;
357 esac
358
359 SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
360 mkdir -p &quot;$SAR_DIR&quot;
361 cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
362 # convert sar data to ascii format
363 while IFS=&quot;&quot; read -r sarfilenum
364 do
365     [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
366 done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
367
368 # DON'T fail build if script fails.
369 exit 0
370 </command>
371         </hudson.tasks.Shell>
372         <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
373           <managedFiles>
374             <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
375               <fileId>jenkins-log-archives-settings</fileId>
376               <targetLocation/>
377               <variable>SETTINGS_FILE</variable>
378             </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
379           </managedFiles>
380         </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
381         <EnvInjectBuilder>
382           <info>
383             <propertiesContent>SERVER_ID=logs</propertiesContent>
384           </info>
385         </EnvInjectBuilder>
386         <hudson.tasks.Shell>
387           <command>#!/bin/bash
388 # SPDX-License-Identifier: EPL-1.0
389 ##############################################################################
390 # Copyright (c) 2017 The Linux Foundation and others.
391 #
392 # All rights reserved. This program and the accompanying materials
393 # are made available under the terms of the Eclipse Public License v1.0
394 # which accompanies this distribution, and is available at
395 # http://www.eclipse.org/legal/epl-v10.html
396 ##############################################################################
397 echo &quot;---&gt; create-netrc.sh&quot;
398
399 # Ensure we fail the job if any steps fail.
400 set -eu -o pipefail
401
402 NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
403 CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
404     -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
405     -v x:username -o &quot;:&quot; -v x:password \
406     &quot;$SETTINGS_FILE&quot;)
407
408 machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
409 user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
410 pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
411
412 echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
413 </command>
414         </hudson.tasks.Shell>
415         <hudson.tasks.Shell>
416           <command>#!/bin/bash
417 # SPDX-License-Identifier: EPL-1.0
418 ##############################################################################
419 # Copyright (c) 2017 The Linux Foundation and others.
420 #
421 # All rights reserved. This program and the accompanying materials
422 # are made available under the terms of the Eclipse Public License v1.0
423 # which accompanies this distribution, and is available at
424 # http://www.eclipse.org/legal/epl-v10.html
425 ##############################################################################
426 echo &quot;---&gt; lftools-install.sh&quot;
427
428 # Script to install lftools via a version passed in via lf-infra-parameters
429 #
430 # Required parameters:
431 #
432 #     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
433 #                      set to a strict version number like '1.2.3' or using
434 #                      PEP-440 definitions.
435 #
436 #                      Examples:
437 #                          &lt;1.0.0
438 #                          &gt;=1.0.0,&lt;2.0.0
439 #
440 # By default a released version of lftools should always be used.
441 # The purpose of the 2 variables below is so that lftools devs can test
442 # unreleased versions of lftools. There are 2 methods to install a dev version
443 # of lftools:
444 #
445 #     1) gerrit patch: Used to test a patch that has not yet been merged.
446 #                      To do this set something like this:
447 #                          LFTOOLS_MODE=gerrit
448 #                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
449 #
450 #     2) git branch: Used to install an lftools version from a specific branch.
451 #                    To use this set the variables as follows:
452 #                          LFTOOLS_MODE=git
453 #                          LFTOOLS_REFSPEC=master
454 #
455 #     3) release : The intended use case and default setting.
456 #                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
457
458 LFTOOLS_MODE=release  # release | git | gerrit
459 LFTOOLS_REFSPEC=master
460
461 # Ensure we fail the job if any steps fail.
462 # DO NOT set -u as virtualenv's activate script has unbound variables
463 set -e -o pipefail
464
465 virtualenv --quiet &quot;/tmp/v/lftools&quot;
466 # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
467 source &quot;/tmp/v/lftools/bin/activate&quot;
468 pip install --quiet --upgrade pip
469
470 case $LFTOOLS_MODE in
471     gerrit)
472         git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
473         pushd /tmp/lftools
474         git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
475         git checkout FETCH_HEAD
476         pip install --quiet --upgrade -r requirements.txt
477         pip install --quiet --upgrade -e .
478         popd
479         ;;
480
481     git)
482         pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
483         ;;
484
485     release)
486         if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
487             LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
488         fi
489
490         pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
491         ;;
492 esac
493
494 lftools --version
495
496 # pipdeptree prints out a lot of information because lftools pulls in many
497 # dependencies. Let's only print it if we want to debug.
498 # echo &quot;----&gt; Pip Dependency Tree&quot;
499 # pip install --quiet --upgrade pipdeptree
500 # pipdeptree
501
502 #!/bin/bash
503 # SPDX-License-Identifier: EPL-1.0
504 ##############################################################################
505 # Copyright (c) 2017 The Linux Foundation and others.
506 #
507 # All rights reserved. This program and the accompanying materials
508 # are made available under the terms of the Eclipse Public License v1.0
509 # which accompanies this distribution, and is available at
510 # http://www.eclipse.org/legal/epl-v10.html
511 ##############################################################################
512 echo &quot;---&gt; logs-deploy.sh&quot;
513
514 # Ensure we fail the job if any steps fail.
515 set -eu -o pipefail
516
517 set -x  # Trace commands for this script to make debugging easier.
518
519 ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
520 LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
521
522 if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
523 then
524     set +x # Disable trace since we no longer need it
525
526     echo &quot;WARNING: Logging server not set&quot;
527 else
528     NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
529     NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
530     BUILD_URL=&quot;${BUILD_URL}&quot;
531
532     lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
533     lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
534
535     set +x  # Disable trace since we no longer need it.
536
537     echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
538 fi
539 </command>
540         </hudson.tasks.Shell>
541         <hudson.tasks.Shell>
542           <command>#!/bin/bash
543 # SPDX-License-Identifier: EPL-1.0
544 ##############################################################################
545 # Copyright (c) 2017 The Linux Foundation and others.
546 #
547 # All rights reserved. This program and the accompanying materials
548 # are made available under the terms of the Eclipse Public License v1.0
549 # which accompanies this distribution, and is available at
550 # http://www.eclipse.org/legal/epl-v10.html
551 ##############################################################################
552
553 # Clear log credential files
554 rm &quot;$SETTINGS_FILE&quot;
555 rm ~/.netrc
556 </command>
557         </hudson.tasks.Shell>
558         <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
559           <regexp>^Build logs: .*</regexp>
560         </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
561       </buildSteps>
562       <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
563       <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
564       <markBuildUnstable>false</markBuildUnstable>
565     </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
566     <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
567       <patterns>
568         <hudson.plugins.ws__cleanup.Pattern>
569           <pattern>**/*.jenkins-trigger</pattern>
570           <type>EXCLUDE</type>
571         </hudson.plugins.ws__cleanup.Pattern>
572       </patterns>
573       <deleteDirs>false</deleteDirs>
574       <cleanupMatrixParent>false</cleanupMatrixParent>
575       <externalDelete/>
576       <cleanWhenSuccess>true</cleanWhenSuccess>
577       <cleanWhenUnstable>true</cleanWhenUnstable>
578       <cleanWhenFailure>true</cleanWhenFailure>
579       <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
580       <cleanWhenAborted>true</cleanWhenAborted>
581       <notFailBuild>true</notFailBuild>
582     </hudson.plugins.ws__cleanup.WsCleanup>
583   </publishers>
584   <buildWrappers>
585     <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
586     <hudson.plugins.build__timeout.BuildTimeoutWrapper>
587       <timeoutMinutes>30</timeoutMinutes>
588       <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
589       <failBuild>true</failBuild>
590       <writingDescription>false</writingDescription>
591       <timeoutPercentage>0</timeoutPercentage>
592       <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
593       <timeoutType>absolute</timeoutType>
594     </hudson.plugins.build__timeout.BuildTimeoutWrapper>
595     <hudson.plugins.timestamper.TimestamperBuildWrapper/>
596     <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
597       <user>test-credential</user>
598     </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
599     <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
600     <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
601       <managedFiles>
602         <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
603           <fileId>npmrc</fileId>
604           <targetLocation>$HOME/.npmrc</targetLocation>
605           <variable/>
606         </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
607       </managedFiles>
608     </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
609   </buildWrappers>
610 </project>