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