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