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