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