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