1 <?xml version="1.0" encoding="utf-8"?>
5 <description><!-- Managed by Jenkins Job Builder --></description>
6 <keepDependencies>false</keepDependencies>
7 <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
8 <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
9 <concurrentBuild>false</concurrentBuild>
10 <assignedNode>build-vm</assignedNode>
11 <canRoam>false</canRoam>
13 <jenkins.model.BuildDiscarderProperty>
14 <strategy class="hudson.tasks.LogRotator">
15 <daysToKeep>30</daysToKeep>
16 <numToKeep>-1</numToKeep>
17 <artifactDaysToKeep>-1</artifactDaysToKeep>
18 <artifactNumToKeep>0</artifactNumToKeep>
20 </jenkins.model.BuildDiscarderProperty>
21 <hudson.model.ParametersDefinitionProperty>
22 <parameterDefinitions>
23 <hudson.model.StringParameterDefinition>
25 <description>Parameter to identify a Gerrit project. This is typically the
26 project repo path as exists in Gerrit.
27 For example: ofextensions/circuitsw
29 <defaultValue>releng/ciman</defaultValue>
30 </hudson.model.StringParameterDefinition>
31 <hudson.model.StringParameterDefinition>
33 <description>Stream is often set to the same name as 'branch' but can
34 sometimes be used as a name representing a project's release code
37 <defaultValue>master</defaultValue>
38 </hudson.model.StringParameterDefinition>
39 <hudson.model.StringParameterDefinition>
40 <name>GERRIT_PROJECT</name>
41 <description>Parameter to identify Gerrit project. This is typically the
42 project repo path as exists in Gerrit.
43 For example: ofextensions/circuitsw
45 Note that Gerrit will override this parameter automatically if a
46 job is triggered by Gerrit.
48 <defaultValue>releng/ciman</defaultValue>
49 </hudson.model.StringParameterDefinition>
50 <hudson.model.StringParameterDefinition>
51 <name>GERRIT_BRANCH</name>
52 <description>Parameter to identify a Gerrit branch.
54 Note that Gerrit will override this parameter automatically if a
55 job is triggered by Gerrit.
57 <defaultValue>master</defaultValue>
58 </hudson.model.StringParameterDefinition>
59 <hudson.model.StringParameterDefinition>
60 <name>GERRIT_REFSPEC</name>
61 <description>Parameter to identify a refspec when pulling from Gerrit.
63 Note that Gerrit will override this parameter automatically if a
64 job is triggered by Gerrit.
66 <defaultValue>refs/heads/master</defaultValue>
67 </hudson.model.StringParameterDefinition>
68 <hudson.model.StringParameterDefinition>
69 <name>LFTOOLS_VERSION</name>
70 <description>Version of lftools to install. Can be a specific version like
71 '0.6.0' or a PEP-440 definition.
72 https://www.python.org/dev/peps/pep-0440/
73 For example '<1.0.0' or '>=1.0.0,<2.0.0'.
75 <defaultValue><1.0.0</defaultValue>
76 </hudson.model.StringParameterDefinition>
77 <hudson.model.StringParameterDefinition>
78 <name>MAVEN_OPTS</name>
79 <description>Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
82 </hudson.model.StringParameterDefinition>
83 <hudson.model.StringParameterDefinition>
84 <name>MAVEN_PARAMS</name>
85 <description>Maven parameters to pass to the mvn command.
88 </hudson.model.StringParameterDefinition>
89 <hudson.model.StringParameterDefinition>
91 <description>Maven selector to be used by shell scripts</description>
92 <defaultValue>/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn</defaultValue>
93 </hudson.model.StringParameterDefinition>
94 <hudson.model.StringParameterDefinition>
95 <name>STAGING_PROFILE_ID</name>
96 <description>Nexus staging profile ID.
98 <defaultValue>uuddlrlrba</defaultValue>
99 </hudson.model.StringParameterDefinition>
100 </parameterDefinitions>
101 </hudson.model.ParametersDefinitionProperty>
103 <scm class="hudson.plugins.git.GitSCM">
104 <configVersion>2</configVersion>
106 <hudson.plugins.git.UserRemoteConfig>
108 <refspec>$GERRIT_REFSPEC</refspec>
109 <url>$GIT_URL/$PROJECT</url>
110 <credentialsId>test-credential</credentialsId>
111 </hudson.plugins.git.UserRemoteConfig>
114 <hudson.plugins.git.BranchSpec>
115 <name>refs/heads/$GERRIT_BRANCH</name>
116 </hudson.plugins.git.BranchSpec>
119 <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
120 <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
121 <authorOrCommitter>false</authorOrCommitter>
122 <wipeOutWorkspace>true</wipeOutWorkspace>
123 <pruneBranches>false</pruneBranches>
124 <remotePoll>false</remotePoll>
125 <gitTool>Default</gitTool>
126 <submoduleCfg class="list"/>
131 <skipTag>true</skipTag>
133 <useShallowClone>false</useShallowClone>
134 <ignoreNotifyCommit>false</ignoreNotifyCommit>
136 <hudson.plugins.git.extensions.impl.SubmoduleOption>
137 <disableSubmodules>false</disableSubmodules>
138 <recursiveSubmodules>true</recursiveSubmodules>
139 <trackingSubmodules>false</trackingSubmodules>
141 <timeout>10</timeout>
142 </hudson.plugins.git.extensions.impl.SubmoduleOption>
143 <hudson.plugins.git.extensions.impl.WipeWorkspace/>
146 <triggers class="vector">
147 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
150 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
151 <compareType>ANT</compareType>
152 <pattern>releng/ciman</pattern>
154 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
155 <compareType>ANT</compareType>
156 <pattern>**/master</pattern>
157 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
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.PluginCommentAddedContainsEvent>
180 <commentAddedCommentContains>build release$</commentAddedCommentContains>
181 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
184 <buildFailureMessage/>
185 <buildSuccessfulMessage/>
186 <buildUnstableMessage/>
187 <buildNotBuiltMessage/>
188 <buildUnsuccessfulFilepath/>
190 <serverName>test-server</serverName>
191 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
195 <command>mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes</command>
196 </hudson.tasks.Shell>
198 <command>echo "quiet=on" > "$HOME/.wgetrc"</command>
199 </hudson.tasks.Shell>
201 <targets>--version</targets>
203 <mavenName>mvn33</mavenName>
204 <usePrivateRepository>false</usePrivateRepository>
205 <settings class="jenkins.mvn.DefaultSettingsProvider"/>
206 <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
207 </hudson.tasks.Maven>
209 <command>rm "$HOME/.wgetrc"</command>
210 </hudson.tasks.Shell>
211 <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
213 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
214 <fileId>global-settings</fileId>
216 <variable>GLOBAL_SETTINGS_FILE</variable>
217 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
218 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
219 <fileId>gerrit-maven-project-settings</fileId>
221 <variable>SETTINGS_FILE</variable>
222 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
224 </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
227 <propertiesContent>SERVER_ID=opendaylight-staging</propertiesContent>
232 # SPDX-License-Identifier: EPL-1.0
233 ##############################################################################
234 # Copyright (c) 2017 The Linux Foundation and others.
236 # All rights reserved. This program and the accompanying materials
237 # are made available under the terms of the Eclipse Public License v1.0
238 # which accompanies this distribution, and is available at
239 # http://www.eclipse.org/legal/epl-v10.html
240 ##############################################################################
241 echo "---> create-netrc.sh"
243 # Ensure we fail the job if any steps fail.
246 NEXUS_URL="${NEXUS_URL:-$NEXUSPROXY}"
247 CREDENTIAL=$(xmlstarlet sel -N "x=http://maven.apache.org/SETTINGS/1.0.0" \
248 -t -m "/x:settings/x:servers/x:server[x:id='${SERVER_ID}']" \
249 -v x:username -o ":" -v x:password \
250 "$SETTINGS_FILE")
252 machine=$(echo "$NEXUS_URL" | awk -F/ '{print $3}')
253 user=$(echo "$CREDENTIAL" | cut -f1 -d:)
254 pass=$(echo "$CREDENTIAL" | cut -f2 -d:)
256 echo "machine $machine login $user password $pass" > ~/.netrc
258 </hudson.tasks.Shell>
261 # SPDX-License-Identifier: EPL-1.0
262 ##############################################################################
263 # Copyright (c) 2017 The Linux Foundation and others.
265 # All rights reserved. This program and the accompanying materials
266 # are made available under the terms of the Eclipse Public License v1.0
267 # which accompanies this distribution, and is available at
268 # http://www.eclipse.org/legal/epl-v10.html
269 ##############################################################################
270 echo "---> lftools-install.sh"
272 # Script to install lftools via a version passed in via lf-infra-parameters
274 # Required parameters:
276 # LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
277 # set to a strict version number like '1.2.3' or using
278 # PEP-440 definitions.
282 # >=1.0.0,<2.0.0
284 # By default a released version of lftools should always be used.
285 # The purpose of the 2 variables below is so that lftools devs can test
286 # unreleased versions of lftools. There are 2 methods to install a dev version
289 # 1) gerrit patch: Used to test a patch that has not yet been merged.
290 # To do this set something like this:
291 # LFTOOLS_MODE=gerrit
292 # LFTOOLS_REFSPEC=refs/changes/96/5296/7
294 # 2) git branch: Used to install an lftools version from a specific branch.
295 # To use this set the variables as follows:
297 # LFTOOLS_REFSPEC=master
299 # 3) release : The intended use case and default setting.
300 # Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
302 LFTOOLS_MODE=release # release | git | gerrit
303 LFTOOLS_REFSPEC=master
305 # Ensure we fail the job if any steps fail.
306 # DO NOT set -u as virtualenv's activate script has unbound variables
309 virtualenv --quiet "/tmp/v/lftools"
310 # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
311 source "/tmp/v/lftools/bin/activate"
312 pip install --quiet --upgrade pip
314 case $LFTOOLS_MODE in
316 git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
318 git fetch origin "$LFTOOLS_REFSPEC"
319 git checkout FETCH_HEAD
320 pip install --quiet --upgrade -r requirements.txt
321 pip install --quiet --upgrade -e .
326 pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@"$BRANCH"
330 if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
331 LFTOOLS_VERSION="==$LFTOOLS_VERSION"
334 pip install --quiet --upgrade "lftools${LFTOOLS_VERSION}"
340 # pipdeptree prints out a lot of information because lftools pulls in many
341 # dependencies. Let's only print it if we want to debug.
342 # echo "----> Pip Dependency Tree"
343 # pip install --quiet --upgrade pipdeptree
347 # SPDX-License-Identifier: EPL-1.0
348 ##############################################################################
349 # Copyright (c) 2017 The Linux Foundation and others.
351 # All rights reserved. This program and the accompanying materials
352 # are made available under the terms of the Eclipse Public License v1.0
353 # which accompanies this distribution, and is available at
354 # http://www.eclipse.org/legal/epl-v10.html
355 ##############################################################################
357 # This file contains a list of variables that are generally useful in many
358 # scripts. It is meant to be sourced in other scripts so that the variables can
361 MAVEN_OPTIONS="$(echo --show-version \
364 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
365 -Dmaven.repo.local=/tmp/r \
366 -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)"
367 echo "$MAVEN_OPTIONS"
370 # SPDX-License-Identifier: EPL-1.0
371 ##############################################################################
372 # Copyright (c) 2017 The Linux Foundation and others.
374 # All rights reserved. This program and the accompanying materials
375 # are made available under the terms of the Eclipse Public License v1.0
376 # which accompanies this distribution, and is available at
377 # http://www.eclipse.org/legal/epl-v10.html
378 ##############################################################################
380 # This script removes the -SNAPSHOT from a project to prepare it for release.
382 PATCH_DIR="$WORKSPACE/archives/patches"
383 mkdir -p "$PATCH_DIR"
385 # Ensure we fail the job if any steps fail.
388 echo "$PROJECT" "$(git rev-parse --verify HEAD)" | tee -a "$PATCH_DIR/taglist.log"
390 # Strip -SNAPSHOT from version to prepare release.
391 find . -name "*.xml" -print0 | xargs -0 sed -i 's/-SNAPSHOT//g'
393 git commit -am "Release $PROJECT"
394 git format-patch --stdout "origin/$GERRIT_BRANCH" > "$PATCH_DIR/${PROJECT//\//-}.patch"
395 git bundle create "$PATCH_DIR/${PROJECT//\//-}.bundle" "origin/${GERRIT_BRANCH}..HEAD"
398 # SPDX-License-Identifier: EPL-1.0
399 ##############################################################################
400 # Copyright (c) 2017 The Linux Foundation and others.
402 # All rights reserved. This program and the accompanying materials
403 # are made available under the terms of the Eclipse Public License v1.0
404 # which accompanies this distribution, and is available at
405 # http://www.eclipse.org/legal/epl-v10.html
406 ##############################################################################
408 # This script builds a Maven project and deploys it into a staging repo which
409 # can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
411 # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
412 # Ensure we fail the job if any steps fail.
418 # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
419 # shellcheck disable=SC2086
421 --global-settings "$GLOBAL_SETTINGS_FILE" \
422 --settings "$SETTINGS_FILE" \
423 -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \
424 $MAVEN_PARAMS $MAVEN_OPTIONS
427 # SPDX-License-Identifier: EPL-1.0
428 ##############################################################################
429 # Copyright (c) 2017 The Linux Foundation and others.
431 # All rights reserved. This program and the accompanying materials
432 # are made available under the terms of the Eclipse Public License v1.0
433 # which accompanies this distribution, and is available at
434 # http://www.eclipse.org/legal/epl-v10.html
435 ##############################################################################
437 # This script publishes artifacts to a staging repo in Nexus.
439 # $WORKSPACE/m2repo : Exists and used to deploy the staging repository.
440 # $NEXUS_URL : Jenkins global variable should be defined.
441 # $STAGING_PROFILE_ID : Provided by a job parameter.
443 # Ensure we fail the job if any steps fail.
446 TMP_FILE="$(mktemp)"
447 lftools deploy nexus-stage "$NEXUS_URL" "$STAGING_PROFILE_ID" "$WORKSPACE/m2repo" | tee "$TMP_FILE"
448 staging_repo=$(sed -n -e 's/Staging repository \(.*\) created\./\1/p' "$TMP_FILE")
450 # Store repo info to a file in archives
451 mkdir -p "$WORKSPACE/archives"
452 echo "$staging_repo" > "$WORKSPACE/archives/staging-repo.txt"
455 rm "$TMP_FILE"
457 </hudson.tasks.Shell>
460 set +e # DO NOT cause build failure if any of the rm calls fail.
462 rm "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
464 # In some cases we use the lf-provide-maven-settings macro to produce
465 # a "$HOME/.netrc" file containing credentials. Remove that file here
467 rm "$HOME/.netrc"
469 # DO NOT fail build if any of the above lines fail.
472 </hudson.tasks.Shell>
475 <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
479 # SPDX-License-Identifier: EPL-1.0
480 ##############################################################################
481 # Copyright (c) 2017 The Linux Foundation and others.
483 # All rights reserved. This program and the accompanying materials
484 # are made available under the terms of the Eclipse Public License v1.0
485 # which accompanies this distribution, and is available at
486 # http://www.eclipse.org/legal/epl-v10.html
487 ##############################################################################
488 echo "---> sysstat.sh"
489 set +e # DON'T fail build if script fails.
491 OS=$(facter operatingsystem)
492 case "$OS" in
494 SYSSTAT_PATH="/var/log/sysstat"
496 # Dont run the script when systat is not enabled by default
497 if ! grep --quiet 'ENABLED="true"' "/etc/default/sysstat"; then
502 SYSSTAT_PATH="/var/log/sa"
510 SAR_DIR="$WORKSPACE/archives/sar-reports"
511 mkdir -p "$SAR_DIR"
512 cp "$SYSSTAT_PATH/"* "$_"
513 # convert sar data to ascii format
514 while IFS="" read -r s
516 [ -f "$s" ] && LC_TIME=POSIX sar -A -f "$s" > "$SAR_DIR/sar${s//[!0-9]/}"
517 done < <(find "$SYSSTAT_PATH" -name "sa[0-9]*" || true)
519 # DON'T fail build if script fails.
522 </hudson.tasks.Shell>
523 <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
525 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
526 <fileId>jenkins-log-archives-settings</fileId>
528 <variable>SETTINGS_FILE</variable>
529 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
531 </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
534 <propertiesContent>SERVER_ID=logs</propertiesContent>
539 # SPDX-License-Identifier: EPL-1.0
540 ##############################################################################
541 # Copyright (c) 2017 The Linux Foundation and others.
543 # All rights reserved. This program and the accompanying materials
544 # are made available under the terms of the Eclipse Public License v1.0
545 # which accompanies this distribution, and is available at
546 # http://www.eclipse.org/legal/epl-v10.html
547 ##############################################################################
548 echo "---> create-netrc.sh"
550 # Ensure we fail the job if any steps fail.
553 NEXUS_URL="${NEXUS_URL:-$NEXUSPROXY}"
554 CREDENTIAL=$(xmlstarlet sel -N "x=http://maven.apache.org/SETTINGS/1.0.0" \
555 -t -m "/x:settings/x:servers/x:server[x:id='${SERVER_ID}']" \
556 -v x:username -o ":" -v x:password \
557 "$SETTINGS_FILE")
559 machine=$(echo "$NEXUS_URL" | awk -F/ '{print $3}')
560 user=$(echo "$CREDENTIAL" | cut -f1 -d:)
561 pass=$(echo "$CREDENTIAL" | cut -f2 -d:)
563 echo "machine $machine login $user password $pass" > ~/.netrc
565 </hudson.tasks.Shell>
568 # SPDX-License-Identifier: EPL-1.0
569 ##############################################################################
570 # Copyright (c) 2017 The Linux Foundation and others.
572 # All rights reserved. This program and the accompanying materials
573 # are made available under the terms of the Eclipse Public License v1.0
574 # which accompanies this distribution, and is available at
575 # http://www.eclipse.org/legal/epl-v10.html
576 ##############################################################################
577 echo "---> lftools-install.sh"
579 # Script to install lftools via a version passed in via lf-infra-parameters
581 # Required parameters:
583 # LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
584 # set to a strict version number like '1.2.3' or using
585 # PEP-440 definitions.
589 # >=1.0.0,<2.0.0
591 # By default a released version of lftools should always be used.
592 # The purpose of the 2 variables below is so that lftools devs can test
593 # unreleased versions of lftools. There are 2 methods to install a dev version
596 # 1) gerrit patch: Used to test a patch that has not yet been merged.
597 # To do this set something like this:
598 # LFTOOLS_MODE=gerrit
599 # LFTOOLS_REFSPEC=refs/changes/96/5296/7
601 # 2) git branch: Used to install an lftools version from a specific branch.
602 # To use this set the variables as follows:
604 # LFTOOLS_REFSPEC=master
606 # 3) release : The intended use case and default setting.
607 # Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
609 LFTOOLS_MODE=release # release | git | gerrit
610 LFTOOLS_REFSPEC=master
612 # Ensure we fail the job if any steps fail.
613 # DO NOT set -u as virtualenv's activate script has unbound variables
616 virtualenv --quiet "/tmp/v/lftools"
617 # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
618 source "/tmp/v/lftools/bin/activate"
619 pip install --quiet --upgrade pip
621 case $LFTOOLS_MODE in
623 git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
625 git fetch origin "$LFTOOLS_REFSPEC"
626 git checkout FETCH_HEAD
627 pip install --quiet --upgrade -r requirements.txt
628 pip install --quiet --upgrade -e .
633 pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@"$BRANCH"
637 if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
638 LFTOOLS_VERSION="==$LFTOOLS_VERSION"
641 pip install --quiet --upgrade "lftools${LFTOOLS_VERSION}"
647 # pipdeptree prints out a lot of information because lftools pulls in many
648 # dependencies. Let's only print it if we want to debug.
649 # echo "----> Pip Dependency Tree"
650 # pip install --quiet --upgrade pipdeptree
654 # SPDX-License-Identifier: EPL-1.0
655 ##############################################################################
656 # Copyright (c) 2017 The Linux Foundation and others.
658 # All rights reserved. This program and the accompanying materials
659 # are made available under the terms of the Eclipse Public License v1.0
660 # which accompanies this distribution, and is available at
661 # http://www.eclipse.org/legal/epl-v10.html
662 ##############################################################################
663 echo "---> logs-deploy.sh"
665 # Ensure we fail the job if any steps fail.
668 set -x # Trace commands for this script to make debugging easier.
670 ARCHIVE_ARTIFACTS="${ARCHIVE_ARTIFACTS:-}"
671 LOGS_SERVER="${LOGS_SERVER:-None}"
673 if [ "${LOGS_SERVER}" == 'None' ]
675 set +x # Disable trace since we no longer need it
677 echo "WARNING: Logging server not set"
679 NEXUS_URL="${NEXUS_URL:-$NEXUSPROXY}"
680 NEXUS_PATH="${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}"
681 BUILD_URL="${BUILD_URL}"
683 lftools deploy archives -p "$ARCHIVE_ARTIFACTS" "$NEXUS_URL" "$NEXUS_PATH" "$WORKSPACE"
684 lftools deploy logs "$NEXUS_URL" "$NEXUS_PATH" "$BUILD_URL"
686 set +x # Disable trace since we no longer need it.
688 echo "Build logs: <a href=\"$LOGS_SERVER/$NEXUS_PATH\">$LOGS_SERVER/$NEXUS_PATH</a>"
691 </hudson.tasks.Shell>
694 # SPDX-License-Identifier: EPL-1.0
695 ##############################################################################
696 # Copyright (c) 2017 The Linux Foundation and others.
698 # All rights reserved. This program and the accompanying materials
699 # are made available under the terms of the Eclipse Public License v1.0
700 # which accompanies this distribution, and is available at
701 # http://www.eclipse.org/legal/epl-v10.html
702 ##############################################################################
704 # Clear log credential files
705 rm "$SETTINGS_FILE"
708 </hudson.tasks.Shell>
709 <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
710 <regexp>^Build logs: .*</regexp>
711 </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
713 <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
714 <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
715 <markBuildUnstable>false</markBuildUnstable>
716 </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
717 <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
719 <hudson.plugins.ws__cleanup.Pattern>
720 <pattern>**/*.jenkins-trigger</pattern>
722 </hudson.plugins.ws__cleanup.Pattern>
724 <deleteDirs>false</deleteDirs>
725 <cleanupMatrixParent>false</cleanupMatrixParent>
727 <cleanWhenSuccess>true</cleanWhenSuccess>
728 <cleanWhenUnstable>true</cleanWhenUnstable>
729 <cleanWhenFailure>true</cleanWhenFailure>
730 <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
731 <cleanWhenAborted>true</cleanWhenAborted>
732 <notFailBuild>true</notFailBuild>
733 </hudson.plugins.ws__cleanup.WsCleanup>
736 <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
737 <hudson.plugins.build__timeout.BuildTimeoutWrapper>
738 <timeoutMinutes>30</timeoutMinutes>
739 <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
740 <failBuild>true</failBuild>
741 <writingDescription>false</writingDescription>
742 <timeoutPercentage>0</timeoutPercentage>
743 <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
744 <timeoutType>absolute</timeoutType>
745 </hudson.plugins.build__timeout.BuildTimeoutWrapper>
746 <hudson.plugins.timestamper.TimestamperBuildWrapper/>
747 <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
748 <user>test-credential</user>
749 </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
750 <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>