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