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