1 <?xml version="1.0" encoding="utf-8"?>
4 <description><!-- Managed by Jenkins Job Builder --></description>
5 <keepDependencies>false</keepDependencies>
6 <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
7 <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
8 <concurrentBuild>false</concurrentBuild>
9 <assignedNode>build-vm</assignedNode>
10 <canRoam>false</canRoam>
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>
19 </jenkins.model.BuildDiscarderProperty>
20 <hudson.model.ParametersDefinitionProperty>
21 <parameterDefinitions>
22 <hudson.model.StringParameterDefinition>
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
28 <defaultValue>releng/ciman</defaultValue>
29 </hudson.model.StringParameterDefinition>
30 <hudson.model.StringParameterDefinition>
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
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
44 Note that Gerrit will override this parameter automatically if a
45 job is triggered by Gerrit.
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.
53 Note that Gerrit will override this parameter automatically if a
54 job is triggered by Gerrit.
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.
62 Note that Gerrit will override this parameter automatically if a
63 job is triggered by Gerrit.
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 '<1.0.0' or '>=1.0.0,<2.0.0'.
74 <defaultValue><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>
84 <scm class="hudson.plugins.git.GitSCM">
85 <configVersion>2</configVersion>
87 <hudson.plugins.git.UserRemoteConfig>
89 <refspec>$GERRIT_REFSPEC</refspec>
90 <url>$GIT_URL/$GERRIT_PROJECT</url>
91 <credentialsId>test-credential</credentialsId>
92 </hudson.plugins.git.UserRemoteConfig>
95 <hudson.plugins.git.BranchSpec>
96 <name>refs/heads/$GERRIT_BRANCH</name>
97 </hudson.plugins.git.BranchSpec>
99 <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
100 <remotePoll>false</remotePoll>
101 <gitTool>Default</gitTool>
102 <submoduleCfg class="list"/>
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>
116 <timeout>10</timeout>
117 </hudson.plugins.git.extensions.impl.SubmoduleOption>
118 <hudson.plugins.git.extensions.impl.WipeWorkspace/>
121 <triggers class="vector">
122 <hudson.triggers.TimerTrigger>
123 <spec>00 10 1 * *</spec>
124 </hudson.triggers.TimerTrigger>
125 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
128 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
129 <compareType>ANT</compareType>
130 <pattern>releng/ciman</pattern>
132 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
133 <compareType>ANT</compareType>
134 <pattern>**/master</pattern>
135 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
138 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
139 <compareType>ANT</compareType>
140 <pattern>packer/vars/centos.json</pattern>
141 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
142 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
143 <compareType>ANT</compareType>
144 <pattern>packer/templates/java-builder.json</pattern>
145 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
146 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
147 <compareType>ANT</compareType>
148 <pattern>packer/provision/*.sh</pattern>
149 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
150 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
151 <compareType>ANT</compareType>
152 <pattern>packer/provision/java-builder.yaml</pattern>
153 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
154 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
155 <compareType>ANT</compareType>
156 <pattern>packer/provision/lib/**</pattern>
157 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
159 <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
160 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
163 <onSuccessful>false</onSuccessful>
164 <onFailed>false</onFailed>
165 <onUnstable>false</onUnstable>
166 <onNotBuilt>false</onNotBuilt>
168 <silentMode>false</silentMode>
169 <silentStartMode>false</silentStartMode>
170 <escapeQuotes>true</escapeQuotes>
171 <noNameAndEmailParameters>false</noNameAndEmailParameters>
172 <readableMessage>false</readableMessage>
173 <dependencyJobsNames/>
175 <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
177 <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
179 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
180 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
181 <commentAddedCommentContains>remerge$</commentAddedCommentContains>
182 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
185 <buildFailureMessage/>
186 <buildSuccessfulMessage/>
187 <buildUnstableMessage/>
188 <buildNotBuiltMessage/>
189 <buildUnsuccessfulFilepath/>
191 <serverName>test-server</serverName>
192 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
195 <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
197 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
198 <fileId>ci-packer-cloud-env</fileId>
200 <variable>CLOUDENV</variable>
201 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
203 </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
206 <propertiesContent>PACKER_VERSION=1.1.3
212 # SPDX-License-Identifier: EPL-1.0
213 ##############################################################################
214 # Copyright (c) 2017 The Linux Foundation and others.
216 # All rights reserved. This program and the accompanying materials
217 # are made available under the terms of the Eclipse Public License v1.0
218 # which accompanies this distribution, and is available at
219 # http://www.eclipse.org/legal/epl-v10.html
220 ##############################################################################
221 echo "---> packer-install.sh"
222 # The script checks for the packer binaries and installs the binary
223 # if its not available
225 # $PACKER_VERSION : Define a packer version passed as job paramter
227 PACKER_VERSION="${PACKER_VERSION:-1.1.3}"
229 # Ensure we fail the job if any steps fail.
232 if hash packer.io 2>/dev/null; then
233 echo "packer.io command is available."
235 echo "packer.io command not is available. Installing packer ..."
236 # Installs Hashicorp's Packer binary, required for verify & merge packer jobs
237 pushd "${WORKSPACE}"
238 wget -nv "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip"
239 mkdir -p "${WORKSPACE}/bin"
240 unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d "${WORKSPACE}/bin/"
241 # rename packer to avoid conflict with binary in cracklib
242 mv "${WORKSPACE}/bin/packer" "${WORKSPACE}/bin/packer.io"
247 # SPDX-License-Identifier: EPL-1.0
248 ##############################################################################
249 # Copyright (c) 2017 The Linux Foundation and others.
251 # All rights reserved. This program and the accompanying materials
252 # are made available under the terms of the Eclipse Public License v1.0
253 # which accompanies this distribution, and is available at
254 # http://www.eclipse.org/legal/epl-v10.html
255 ##############################################################################
256 echo "---> packer-validate.sh"
257 # The script validates an packers files.
259 # $CLOUDENV : Provides the cloud credential file.
261 # Ensure we fail the job if any steps fail.
264 PACKER_LOGS_DIR="$WORKSPACE/archives/packer"
265 mkdir -p "$PACKER_LOGS_DIR"
266 export PATH="${WORKSPACE}/bin:$PATH"
269 varfiles=(vars/*.json common-packer/vars/*.json)
270 templates=(templates/*.json)
272 for varfile in "${varfiles[@]}"; do
273 # cloud-env.json is a file containing credentials which is pulled in via
274 # CLOUDENV variable so skip it here.
275 if [[ "$varfile" == *"cloud-env.json"* ]]; then
279 echo "-----> Testing varfile: $varfile"
280 for template in "${templates[@]}"; do
281 export PACKER_LOG="yes"
282 export PACKER_LOG_PATH="$PACKER_LOGS_DIR/packer-validate-${varfile##*/}-${template##*/}.log"
283 if output=$(packer.io validate -var-file="$CLOUDENV" -var-file="$varfile" "$template"); then
284 echo "$template: $output"
286 echo "$template: $output"
292 </hudson.tasks.Shell>
295 # SPDX-License-Identifier: EPL-1.0
296 ##############################################################################
297 # Copyright (c) 2017 The Linux Foundation and others.
299 # All rights reserved. This program and the accompanying materials
300 # are made available under the terms of the Eclipse Public License v1.0
301 # which accompanies this distribution, and is available at
302 # http://www.eclipse.org/legal/epl-v10.html
303 ##############################################################################
304 echo "---> packer-clear-credentials.sh"
306 set +e # DO NOT cause build failure if any of the rm calls fail.
307 rm "$CLOUDENV"
310 </hudson.tasks.Shell>
311 <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
313 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
314 <fileId>ci-packer-cloud-env</fileId>
316 <variable>CLOUDENV</variable>
317 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
319 </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
322 <propertiesContent>PACKER_PLATFORM=centos
323 PACKER_TEMPLATE=java-builder
330 # SPDX-License-Identifier: EPL-1.0
331 ##############################################################################
332 # Copyright (c) 2017 The Linux Foundation and others.
334 # All rights reserved. This program and the accompanying materials
335 # are made available under the terms of the Eclipse Public License v1.0
336 # which accompanies this distribution, and is available at
337 # http://www.eclipse.org/legal/epl-v10.html
338 ##############################################################################
339 echo "---> packer-install.sh"
340 # The script checks for the packer binaries and installs the binary
341 # if its not available
343 # $PACKER_VERSION : Define a packer version passed as job paramter
345 PACKER_VERSION="${PACKER_VERSION:-1.1.3}"
347 # Ensure we fail the job if any steps fail.
350 if hash packer.io 2>/dev/null; then
351 echo "packer.io command is available."
353 echo "packer.io command not is available. Installing packer ..."
354 # Installs Hashicorp's Packer binary, required for verify & merge packer jobs
355 pushd "${WORKSPACE}"
356 wget -nv "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip"
357 mkdir -p "${WORKSPACE}/bin"
358 unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d "${WORKSPACE}/bin/"
359 # rename packer to avoid conflict with binary in cracklib
360 mv "${WORKSPACE}/bin/packer" "${WORKSPACE}/bin/packer.io"
365 # SPDX-License-Identifier: EPL-1.0
366 ##############################################################################
367 # Copyright (c) 2017 The Linux Foundation and others.
369 # All rights reserved. This program and the accompanying materials
370 # are made available under the terms of the Eclipse Public License v1.0
371 # which accompanies this distribution, and is available at
372 # http://www.eclipse.org/legal/epl-v10.html
373 ##############################################################################
374 echo "---> packer-build.sh"
375 # The script builds an image using packer
376 # $CLOUDENV : Provides the cloud credential file.
377 # $PACKER_PLATFORM : Provides the packer platform.
378 # $PACKER_TEMPLATE : Provides the packer temnplate.
380 # Ensure we fail the job if any steps fail.
383 PACKER_LOGS_DIR="$WORKSPACE/archives/packer"
384 PACKER_BUILD_LOG="$PACKER_LOGS_DIR/packer-build.log"
385 mkdir -p "$PACKER_LOGS_DIR"
386 export PATH="${WORKSPACE}/bin:$PATH"
388 # Prioritize the project's own version of vars if available
389 platform_file="vars/$PACKER_PLATFORM.json"
390 if [ -f "$PACKER_PLATFORM" ]; then
391 platform_file="vars/$PACKER_PLATFORM.json"
395 export PACKER_LOG="yes"
396 export PACKER_LOG_PATH="$PACKER_BUILD_LOG"
397 packer.io build -color=false \
398 -var-file="$CLOUDENV" \
399 -var-file="$platform_file" \
400 "templates/$PACKER_TEMPLATE.json"
402 # Retrive the list of cloud providers
403 mapfile -t clouds < <(jq -r '.builders[].name' "templates/$PACKER_TEMPLATE.json")
405 # Split public/private clouds logs
406 for cloud in "${clouds[@]}"; do
407 grep -e "$cloud" "$PACKER_BUILD_LOG" > "$PACKER_LOGS_DIR/packer-build_$cloud.log" 2>&1
410 </hudson.tasks.Shell>
413 # SPDX-License-Identifier: EPL-1.0
414 ##############################################################################
415 # Copyright (c) 2017 The Linux Foundation and others.
417 # All rights reserved. This program and the accompanying materials
418 # are made available under the terms of the Eclipse Public License v1.0
419 # which accompanies this distribution, and is available at
420 # http://www.eclipse.org/legal/epl-v10.html
421 ##############################################################################
422 echo "---> packer-clear-credentials.sh"
424 set +e # DO NOT cause build failure if any of the rm calls fail.
425 rm "$CLOUDENV"
428 </hudson.tasks.Shell>
431 <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
435 # SPDX-License-Identifier: EPL-1.0
436 ##############################################################################
437 # Copyright (c) 2017 The Linux Foundation and others.
439 # All rights reserved. This program and the accompanying materials
440 # are made available under the terms of the Eclipse Public License v1.0
441 # which accompanies this distribution, and is available at
442 # http://www.eclipse.org/legal/epl-v10.html
443 ##############################################################################
444 echo "---> sysstat.sh"
445 set +e # DON'T fail build if script fails.
447 OS=$(facter operatingsystem)
448 case "$OS" in
450 SYSSTAT_PATH="/var/log/sysstat"
452 # Dont run the script when systat is not enabled by default
453 if ! grep --quiet 'ENABLED="true"' "/etc/default/sysstat"; then
458 SYSSTAT_PATH="/var/log/sa"
466 SAR_DIR="$WORKSPACE/archives/sar-reports"
467 mkdir -p "$SAR_DIR"
468 cp "$SYSSTAT_PATH/"* "$_"
469 # convert sar data to ascii format
470 while IFS="" read -r sarfilenum
472 [ -f "$sarfilenum" ] && LC_TIME=POSIX sar -A -f "$sarfilenum" > "$SAR_DIR/sar${sarfilenum//[!0-9]/}"
473 done < <(find "$SYSSTAT_PATH" -name "sa[0-9]*" || true)
475 # DON'T fail build if script fails.
478 </hudson.tasks.Shell>
479 <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
481 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
482 <fileId>jenkins-log-archives-settings</fileId>
484 <variable>SETTINGS_FILE</variable>
485 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
487 </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
490 <propertiesContent>SERVER_ID=logs</propertiesContent>
495 # SPDX-License-Identifier: EPL-1.0
496 ##############################################################################
497 # Copyright (c) 2017 The Linux Foundation and others.
499 # All rights reserved. This program and the accompanying materials
500 # are made available under the terms of the Eclipse Public License v1.0
501 # which accompanies this distribution, and is available at
502 # http://www.eclipse.org/legal/epl-v10.html
503 ##############################################################################
504 echo "---> create-netrc.sh"
506 # Ensure we fail the job if any steps fail.
509 NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}"
510 CREDENTIAL=$(xmlstarlet sel -N "x=http://maven.apache.org/SETTINGS/1.0.0" \
511 -t -m "/x:settings/x:servers/x:server[x:id='${SERVER_ID}']" \
512 -v x:username -o ":" -v x:password \
513 "$SETTINGS_FILE")
515 machine=$(echo "$NEXUS_URL" | awk -F/ '{print $3}')
516 user=$(echo "$CREDENTIAL" | cut -f1 -d:)
517 pass=$(echo "$CREDENTIAL" | cut -f2 -d:)
519 echo "machine ${machine%:*} login $user password $pass" > ~/.netrc
521 </hudson.tasks.Shell>
524 # SPDX-License-Identifier: EPL-1.0
525 ##############################################################################
526 # Copyright (c) 2017 The Linux Foundation and others.
528 # All rights reserved. This program and the accompanying materials
529 # are made available under the terms of the Eclipse Public License v1.0
530 # which accompanies this distribution, and is available at
531 # http://www.eclipse.org/legal/epl-v10.html
532 ##############################################################################
533 echo "---> lftools-install.sh"
535 # Script to install lftools via a version passed in via lf-infra-parameters
537 # Required parameters:
539 # LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
540 # set to a strict version number like '1.2.3' or using
541 # PEP-440 definitions.
545 # >=1.0.0,<2.0.0
547 # By default a released version of lftools should always be used.
548 # The purpose of the 2 variables below is so that lftools devs can test
549 # unreleased versions of lftools. There are 2 methods to install a dev version
552 # 1) gerrit patch: Used to test a patch that has not yet been merged.
553 # To do this set something like this:
554 # LFTOOLS_MODE=gerrit
555 # LFTOOLS_REFSPEC=refs/changes/96/5296/7
557 # 2) git branch: Used to install an lftools version from a specific branch.
558 # To use this set the variables as follows:
560 # LFTOOLS_REFSPEC=master
562 # 3) release : The intended use case and default setting.
563 # Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
565 LFTOOLS_MODE=release # release | git | gerrit
566 LFTOOLS_REFSPEC=master
568 # Ensure we fail the job if any steps fail.
569 # DO NOT set -u as virtualenv's activate script has unbound variables
572 virtualenv --quiet "/tmp/v/lftools"
573 # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
574 source "/tmp/v/lftools/bin/activate"
575 pip install --quiet --upgrade pip
577 case $LFTOOLS_MODE in
579 git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
581 git fetch origin "$LFTOOLS_REFSPEC"
582 git checkout FETCH_HEAD
583 pip install --quiet --upgrade -r requirements.txt
584 pip install --quiet --upgrade -e .
589 pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@"$BRANCH"
593 if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
594 LFTOOLS_VERSION="==$LFTOOLS_VERSION"
597 pip install --quiet --upgrade "lftools${LFTOOLS_VERSION}"
603 # pipdeptree prints out a lot of information because lftools pulls in many
604 # dependencies. Let's only print it if we want to debug.
605 # echo "----> Pip Dependency Tree"
606 # pip install --quiet --upgrade pipdeptree
610 # SPDX-License-Identifier: EPL-1.0
611 ##############################################################################
612 # Copyright (c) 2017 The Linux Foundation and others.
614 # All rights reserved. This program and the accompanying materials
615 # are made available under the terms of the Eclipse Public License v1.0
616 # which accompanies this distribution, and is available at
617 # http://www.eclipse.org/legal/epl-v10.html
618 ##############################################################################
619 echo "---> logs-deploy.sh"
621 # Ensure we fail the job if any steps fail.
624 set -x # Trace commands for this script to make debugging easier.
626 ARCHIVE_ARTIFACTS="${ARCHIVE_ARTIFACTS:-}"
627 LOGS_SERVER="${LOGS_SERVER:-None}"
629 if [ "${LOGS_SERVER}" == 'None' ]
631 set +x # Disable trace since we no longer need it
633 echo "WARNING: Logging server not set"
635 NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}"
636 NEXUS_PATH="${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}"
637 BUILD_URL="${BUILD_URL}"
639 lftools deploy archives -p "$ARCHIVE_ARTIFACTS" "$NEXUS_URL" "$NEXUS_PATH" "$WORKSPACE"
640 lftools deploy logs "$NEXUS_URL" "$NEXUS_PATH" "$BUILD_URL"
642 set +x # Disable trace since we no longer need it.
644 echo "Build logs: <a href=\"$LOGS_SERVER/$NEXUS_PATH\">$LOGS_SERVER/$NEXUS_PATH</a>"
647 </hudson.tasks.Shell>
650 # SPDX-License-Identifier: EPL-1.0
651 ##############################################################################
652 # Copyright (c) 2017 The Linux Foundation and others.
654 # All rights reserved. This program and the accompanying materials
655 # are made available under the terms of the Eclipse Public License v1.0
656 # which accompanies this distribution, and is available at
657 # http://www.eclipse.org/legal/epl-v10.html
658 ##############################################################################
660 # Clear log credential files
661 rm "$SETTINGS_FILE"
664 </hudson.tasks.Shell>
665 <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
666 <regexp>^Build logs: .*</regexp>
667 </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
669 <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
670 <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
671 <markBuildUnstable>false</markBuildUnstable>
672 </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
673 <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
675 <hudson.plugins.ws__cleanup.Pattern>
676 <pattern>**/*.jenkins-trigger</pattern>
678 </hudson.plugins.ws__cleanup.Pattern>
680 <deleteDirs>false</deleteDirs>
681 <cleanupMatrixParent>false</cleanupMatrixParent>
683 <cleanWhenSuccess>true</cleanWhenSuccess>
684 <cleanWhenUnstable>true</cleanWhenUnstable>
685 <cleanWhenFailure>true</cleanWhenFailure>
686 <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
687 <cleanWhenAborted>true</cleanWhenAborted>
688 <notFailBuild>true</notFailBuild>
689 </hudson.plugins.ws__cleanup.WsCleanup>
692 <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
693 <hudson.plugins.build__timeout.BuildTimeoutWrapper>
694 <timeoutMinutes>45</timeoutMinutes>
695 <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
696 <failBuild>true</failBuild>
697 <writingDescription>false</writingDescription>
698 <timeoutPercentage>0</timeoutPercentage>
699 <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
700 <timeoutType>absolute</timeoutType>
701 </hudson.plugins.build__timeout.BuildTimeoutWrapper>
702 <hudson.plugins.timestamper.TimestamperBuildWrapper/>
703 <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
704 <user>test-credential</user>
705 </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
706 <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>
707 <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="config-file-provider">
709 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
710 <fileId>npmrc</fileId>
711 <targetLocation>$HOME/.npmrc</targetLocation>
713 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
715 </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>