Make sysstat script more readable
[releng/global-jjb.git] / .jjb-test / expected-xml / gerrit-maven-maven-javadoc-verify-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>true</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="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
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     <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
158       <spec/>
159       <gerritProjects>
160         <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
161           <compareType>ANT</compareType>
162           <pattern>releng/ciman</pattern>
163           <branches>
164             <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
165               <compareType>ANT</compareType>
166               <pattern>**/master</pattern>
167             </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
168           </branches>
169           <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
170         </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
171       </gerritProjects>
172       <skipVote>
173         <onSuccessful>false</onSuccessful>
174         <onFailed>false</onFailed>
175         <onUnstable>false</onUnstable>
176         <onNotBuilt>false</onNotBuilt>
177       </skipVote>
178       <silentMode>false</silentMode>
179       <silentStartMode>false</silentStartMode>
180       <escapeQuotes>true</escapeQuotes>
181       <noNameAndEmailParameters>false</noNameAndEmailParameters>
182       <readableMessage>false</readableMessage>
183       <dependencyJobsNames/>
184       <notificationLevel/>
185       <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
186       <triggerConfigURL/>
187       <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
188       <triggerOnEvents>
189         <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
190           <excludeDrafts>true</excludeDrafts>
191           <excludeTrivialRebase>false</excludeTrivialRebase>
192           <excludeNoCodeChange>false</excludeNoCodeChange>
193         </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
194         <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
195         <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
196           <commentAddedCommentContains>recheck$</commentAddedCommentContains>
197         </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
198       </triggerOnEvents>
199       <buildStartMessage/>
200       <buildFailureMessage/>
201       <buildSuccessfulMessage/>
202       <buildUnstableMessage/>
203       <buildNotBuiltMessage/>
204       <buildUnsuccessfulFilepath/>
205       <customUrl/>
206       <serverName>test-server</serverName>
207     </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
208   </triggers>
209   <builders>
210     <hudson.tasks.Shell>
211       <command>echo &quot;quiet=on&quot; &gt; &quot;$HOME/.wgetrc&quot;</command>
212     </hudson.tasks.Shell>
213     <hudson.tasks.Maven>
214       <targets>--version</targets>
215       <properties/>
216       <mavenName>mvn33</mavenName>
217       <usePrivateRepository>false</usePrivateRepository>
218       <settings class="jenkins.mvn.DefaultSettingsProvider"/>
219       <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
220     </hudson.tasks.Maven>
221     <hudson.tasks.Shell>
222       <command>rm &quot;$HOME/.wgetrc&quot;</command>
223     </hudson.tasks.Shell>
224     <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
225       <managedFiles>
226         <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
227           <fileId>global-settings</fileId>
228           <targetLocation/>
229           <variable>GLOBAL_SETTINGS_FILE</variable>
230         </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
231         <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
232           <fileId>gerrit-maven-project-settings</fileId>
233           <targetLocation/>
234           <variable>SETTINGS_FILE</variable>
235         </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
236       </managedFiles>
237     </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
238     <hudson.tasks.Shell>
239       <command>#!/bin/bash
240 # SPDX-License-Identifier: EPL-1.0
241 ##############################################################################
242 # Copyright (c) 2017 The Linux Foundation and others.
243 #
244 # All rights reserved. This program and the accompanying materials
245 # are made available under the terms of the Eclipse Public License v1.0
246 # which accompanies this distribution, and is available at
247 # http://www.eclipse.org/legal/epl-v10.html
248 ##############################################################################
249
250 # This file contains a list of variables that are generally useful in many
251 # scripts. It is meant to be sourced in other scripts so that the variables can
252 # be called.
253
254 MAVEN_OPTIONS=&quot;$(echo --show-version \
255     --batch-mode \
256     -Djenkins \
257     -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
258     -Dmaven.repo.local=/tmp/r \
259     -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)&quot;
260 echo &quot;$MAVEN_OPTIONS&quot;
261
262 #!/bin/bash
263 # SPDX-License-Identifier: EPL-1.0
264 ##############################################################################
265 # Copyright (c) 2017 The Linux Foundation and others.
266 #
267 # All rights reserved. This program and the accompanying materials
268 # are made available under the terms of the Eclipse Public License v1.0
269 # which accompanies this distribution, and is available at
270 # http://www.eclipse.org/legal/epl-v10.html
271 ##############################################################################
272
273 # Generates javadoc in a Maven project.
274
275 # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
276 # Ensure we fail the job if any steps fail.
277 set -e -o pipefail
278 set +u
279
280 JAVADOC_DIR=&quot;$WORKSPACE/archives/javadoc&quot;
281 mkdir -p &quot;$WORKSPACE/archives&quot;
282
283 export MAVEN_OPTS
284
285 # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
286 # shellcheck disable=SC2086
287 $MVN clean install javadoc:aggregate \
288     -Pq -Dmaven.javadoc.skip=false \
289     -DskipTests=true \
290     -Dcheckstyle.skip=true \
291     -Dfindbugs.skip=true \
292     --global-settings &quot;$GLOBAL_SETTINGS_FILE&quot; \
293     --settings &quot;$SETTINGS_FILE&quot; \
294     $MAVEN_PARAMS $MAVEN_OPTIONS
295
296 mv &quot;$WORKSPACE/target/site/apidocs&quot; &quot;$JAVADOC_DIR&quot;
297 </command>
298     </hudson.tasks.Shell>
299     <hudson.tasks.Shell>
300       <command>#!/bin/bash
301 set +e  # DO NOT cause build failure if any of the rm calls fail.
302
303 rm &quot;$GLOBAL_SETTINGS_FILE&quot; &quot;$SETTINGS_FILE&quot;
304
305 # In some cases we use the lf-provide-maven-settings macro to produce
306 # a &quot;$HOME/.netrc&quot; file containing credentials. Remove that file here
307 # too if it exists.
308 rm &quot;$HOME/.netrc&quot;
309
310 # DO NOT fail build if any of the above lines fail.
311 exit 0
312 </command>
313     </hudson.tasks.Shell>
314   </builders>
315   <publishers>
316     <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
317       <buildSteps>
318         <hudson.tasks.Shell>
319           <command>#!/bin/bash
320 # SPDX-License-Identifier: EPL-1.0
321 ##############################################################################
322 # Copyright (c) 2017 The Linux Foundation and others.
323 #
324 # All rights reserved. This program and the accompanying materials
325 # are made available under the terms of the Eclipse Public License v1.0
326 # which accompanies this distribution, and is available at
327 # http://www.eclipse.org/legal/epl-v10.html
328 ##############################################################################
329 echo &quot;---&gt; sysstat.sh&quot;
330 set +e  # DON'T fail build if script fails.
331
332 OS=$(facter operatingsystem)
333 case &quot;$OS&quot; in
334     Ubuntu)
335         SYSSTAT_PATH=&quot;/var/log/sysstat&quot;
336
337         # Dont run the script when systat is not enabled by default
338         if ! grep --quiet 'ENABLED=&quot;true&quot;' &quot;/etc/default/sysstat&quot;; then
339             exit 0
340         fi
341     ;;
342     CentOS|RedHat)
343         SYSSTAT_PATH=&quot;/var/log/sa&quot;
344     ;;
345     *)
346         # nothing to do
347         exit 0
348     ;;
349 esac
350
351 SAR_DIR=&quot;$WORKSPACE/archives/sar-reports&quot;
352 mkdir -p &quot;$SAR_DIR&quot;
353 cp &quot;$SYSSTAT_PATH/&quot;* &quot;$_&quot;
354 # convert sar data to ascii format
355 while IFS=&quot;&quot; read -r sarfilenum
356 do
357     [ -f &quot;$sarfilenum&quot; ] &amp;&amp; LC_TIME=POSIX sar -A -f &quot;$sarfilenum&quot; &gt; &quot;$SAR_DIR/sar${sarfilenum//[!0-9]/}&quot;
358 done &lt; &lt;(find &quot;$SYSSTAT_PATH&quot; -name &quot;sa[0-9]*&quot; || true)
359
360 # DON'T fail build if script fails.
361 exit 0
362 </command>
363         </hudson.tasks.Shell>
364         <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
365           <managedFiles>
366             <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
367               <fileId>jenkins-log-archives-settings</fileId>
368               <targetLocation/>
369               <variable>SETTINGS_FILE</variable>
370             </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
371           </managedFiles>
372         </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
373         <EnvInjectBuilder>
374           <info>
375             <propertiesContent>SERVER_ID=logs</propertiesContent>
376           </info>
377         </EnvInjectBuilder>
378         <hudson.tasks.Shell>
379           <command>#!/bin/bash
380 # SPDX-License-Identifier: EPL-1.0
381 ##############################################################################
382 # Copyright (c) 2017 The Linux Foundation and others.
383 #
384 # All rights reserved. This program and the accompanying materials
385 # are made available under the terms of the Eclipse Public License v1.0
386 # which accompanies this distribution, and is available at
387 # http://www.eclipse.org/legal/epl-v10.html
388 ##############################################################################
389 echo &quot;---&gt; create-netrc.sh&quot;
390
391 # Ensure we fail the job if any steps fail.
392 set -eu -o pipefail
393
394 NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
395 CREDENTIAL=$(xmlstarlet sel -N &quot;x=http://maven.apache.org/SETTINGS/1.0.0&quot; \
396     -t -m &quot;/x:settings/x:servers/x:server[x:id='${SERVER_ID}']&quot; \
397     -v x:username -o &quot;:&quot; -v x:password \
398     &quot;$SETTINGS_FILE&quot;)
399
400 machine=$(echo &quot;$NEXUS_URL&quot; | awk -F/ '{print $3}')
401 user=$(echo &quot;$CREDENTIAL&quot; | cut -f1 -d:)
402 pass=$(echo &quot;$CREDENTIAL&quot; | cut -f2 -d:)
403
404 echo &quot;machine ${machine%:*} login $user password $pass&quot; &gt; ~/.netrc
405 </command>
406         </hudson.tasks.Shell>
407         <hudson.tasks.Shell>
408           <command>#!/bin/bash
409 # SPDX-License-Identifier: EPL-1.0
410 ##############################################################################
411 # Copyright (c) 2017 The Linux Foundation and others.
412 #
413 # All rights reserved. This program and the accompanying materials
414 # are made available under the terms of the Eclipse Public License v1.0
415 # which accompanies this distribution, and is available at
416 # http://www.eclipse.org/legal/epl-v10.html
417 ##############################################################################
418 echo &quot;---&gt; lftools-install.sh&quot;
419
420 # Script to install lftools via a version passed in via lf-infra-parameters
421 #
422 # Required parameters:
423 #
424 #     LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
425 #                      set to a strict version number like '1.2.3' or using
426 #                      PEP-440 definitions.
427 #
428 #                      Examples:
429 #                          &lt;1.0.0
430 #                          &gt;=1.0.0,&lt;2.0.0
431 #
432 # By default a released version of lftools should always be used.
433 # The purpose of the 2 variables below is so that lftools devs can test
434 # unreleased versions of lftools. There are 2 methods to install a dev version
435 # of lftools:
436 #
437 #     1) gerrit patch: Used to test a patch that has not yet been merged.
438 #                      To do this set something like this:
439 #                          LFTOOLS_MODE=gerrit
440 #                          LFTOOLS_REFSPEC=refs/changes/96/5296/7
441 #
442 #     2) git branch: Used to install an lftools version from a specific branch.
443 #                    To use this set the variables as follows:
444 #                          LFTOOLS_MODE=git
445 #                          LFTOOLS_REFSPEC=master
446 #
447 #     3) release : The intended use case and default setting.
448 #                  Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
449
450 LFTOOLS_MODE=release  # release | git | gerrit
451 LFTOOLS_REFSPEC=master
452
453 # Ensure we fail the job if any steps fail.
454 # DO NOT set -u as virtualenv's activate script has unbound variables
455 set -e -o pipefail
456
457 virtualenv --quiet &quot;/tmp/v/lftools&quot;
458 # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
459 source &quot;/tmp/v/lftools/bin/activate&quot;
460 pip install --quiet --upgrade pip
461
462 case $LFTOOLS_MODE in
463     gerrit)
464         git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
465         pushd /tmp/lftools
466         git fetch origin &quot;$LFTOOLS_REFSPEC&quot;
467         git checkout FETCH_HEAD
468         pip install --quiet --upgrade -r requirements.txt
469         pip install --quiet --upgrade -e .
470         popd
471         ;;
472
473     git)
474         pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@&quot;$BRANCH&quot;
475         ;;
476
477     release)
478         if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
479             LFTOOLS_VERSION=&quot;==$LFTOOLS_VERSION&quot;
480         fi
481
482         pip install --quiet --upgrade &quot;lftools${LFTOOLS_VERSION}&quot;
483         ;;
484 esac
485
486 lftools --version
487
488 # pipdeptree prints out a lot of information because lftools pulls in many
489 # dependencies. Let's only print it if we want to debug.
490 # echo &quot;----&gt; Pip Dependency Tree&quot;
491 # pip install --quiet --upgrade pipdeptree
492 # pipdeptree
493
494 #!/bin/bash
495 # SPDX-License-Identifier: EPL-1.0
496 ##############################################################################
497 # Copyright (c) 2017 The Linux Foundation and others.
498 #
499 # All rights reserved. This program and the accompanying materials
500 # are made available under the terms of the Eclipse Public License v1.0
501 # which accompanies this distribution, and is available at
502 # http://www.eclipse.org/legal/epl-v10.html
503 ##############################################################################
504 echo &quot;---&gt; logs-deploy.sh&quot;
505
506 # Ensure we fail the job if any steps fail.
507 set -eu -o pipefail
508
509 set -x  # Trace commands for this script to make debugging easier.
510
511 ARCHIVE_ARTIFACTS=&quot;${ARCHIVE_ARTIFACTS:-}&quot;
512 LOGS_SERVER=&quot;${LOGS_SERVER:-None}&quot;
513
514 if [ &quot;${LOGS_SERVER}&quot; == 'None' ]
515 then
516     set +x # Disable trace since we no longer need it
517
518     echo &quot;WARNING: Logging server not set&quot;
519 else
520     NEXUS_URL=&quot;${NEXUSPROXY:-$NEXUS_URL}&quot;
521     NEXUS_PATH=&quot;${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}&quot;
522     BUILD_URL=&quot;${BUILD_URL}&quot;
523
524     lftools deploy archives -p &quot;$ARCHIVE_ARTIFACTS&quot; &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$WORKSPACE&quot;
525     lftools deploy logs &quot;$NEXUS_URL&quot; &quot;$NEXUS_PATH&quot; &quot;$BUILD_URL&quot;
526
527     set +x  # Disable trace since we no longer need it.
528
529     echo &quot;Build logs: &lt;a href=\&quot;$LOGS_SERVER/$NEXUS_PATH\&quot;&gt;$LOGS_SERVER/$NEXUS_PATH&lt;/a&gt;&quot;
530 fi
531 </command>
532         </hudson.tasks.Shell>
533         <hudson.tasks.Shell>
534           <command>#!/bin/bash
535 # SPDX-License-Identifier: EPL-1.0
536 ##############################################################################
537 # Copyright (c) 2017 The Linux Foundation and others.
538 #
539 # All rights reserved. This program and the accompanying materials
540 # are made available under the terms of the Eclipse Public License v1.0
541 # which accompanies this distribution, and is available at
542 # http://www.eclipse.org/legal/epl-v10.html
543 ##############################################################################
544
545 # Clear log credential files
546 rm &quot;$SETTINGS_FILE&quot;
547 rm ~/.netrc
548 </command>
549         </hudson.tasks.Shell>
550         <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
551           <regexp>^Build logs: .*</regexp>
552         </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
553       </buildSteps>
554       <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
555       <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
556       <markBuildUnstable>false</markBuildUnstable>
557     </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
558     <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
559       <patterns>
560         <hudson.plugins.ws__cleanup.Pattern>
561           <pattern>**/*.jenkins-trigger</pattern>
562           <type>EXCLUDE</type>
563         </hudson.plugins.ws__cleanup.Pattern>
564       </patterns>
565       <deleteDirs>false</deleteDirs>
566       <cleanupMatrixParent>false</cleanupMatrixParent>
567       <externalDelete/>
568       <cleanWhenSuccess>true</cleanWhenSuccess>
569       <cleanWhenUnstable>true</cleanWhenUnstable>
570       <cleanWhenFailure>true</cleanWhenFailure>
571       <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
572       <cleanWhenAborted>true</cleanWhenAborted>
573       <notFailBuild>true</notFailBuild>
574     </hudson.plugins.ws__cleanup.WsCleanup>
575   </publishers>
576   <buildWrappers>
577     <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
578     <hudson.plugins.build__timeout.BuildTimeoutWrapper>
579       <timeoutMinutes>30</timeoutMinutes>
580       <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
581       <failBuild>true</failBuild>
582       <writingDescription>false</writingDescription>
583       <timeoutPercentage>0</timeoutPercentage>
584       <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
585       <timeoutType>absolute</timeoutType>
586     </hudson.plugins.build__timeout.BuildTimeoutWrapper>
587     <hudson.plugins.timestamper.TimestamperBuildWrapper/>
588     <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
589       <user>test-credential</user>
590     </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
591     <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
592     <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
593       <managedFiles>
594         <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
595           <fileId>npmrc</fileId>
596           <targetLocation>$HOME/.npmrc</targetLocation>
597           <variable/>
598         </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
599       </managedFiles>
600     </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
601   </buildWrappers>
602 </project>