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>true</concurrentBuild>
10 <assignedNode>build-vm</assignedNode>
11 <canRoam>false</canRoam>
13 <jenkins.model.BuildDiscarderProperty>
14 <strategy class="hudson.tasks.LogRotator">
15 <daysToKeep>7</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.
87 <defaultValue>-Dstream=$STREAM</defaultValue>
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="com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"/>
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>
160 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
161 <compareType>ANT</compareType>
162 <pattern>**</pattern>
163 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
165 <disableStrictForbiddenFileVerification>false</disableStrictForbiddenFileVerification>
166 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
169 <onSuccessful>false</onSuccessful>
170 <onFailed>false</onFailed>
171 <onUnstable>false</onUnstable>
172 <onNotBuilt>false</onNotBuilt>
174 <silentMode>false</silentMode>
175 <silentStartMode>false</silentStartMode>
176 <escapeQuotes>true</escapeQuotes>
177 <noNameAndEmailParameters>false</noNameAndEmailParameters>
178 <readableMessage>false</readableMessage>
179 <dependencyJobsNames/>
181 <dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
183 <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
185 <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
186 <commentAddedCommentContains>recheck: [0-9 ]+</commentAddedCommentContains>
187 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
190 <buildFailureMessage/>
191 <buildSuccessfulMessage/>
192 <buildUnstableMessage/>
193 <buildNotBuiltMessage/>
194 <buildUnsuccessfulFilepath/>
196 <serverName>test-server</serverName>
197 </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
201 <command>mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes</command>
202 </hudson.tasks.Shell>
204 <command>echo "quiet=on" > "$HOME/.wgetrc"</command>
205 </hudson.tasks.Shell>
207 <targets>--version</targets>
209 <mavenName>mvn33</mavenName>
210 <usePrivateRepository>false</usePrivateRepository>
211 <settings class="jenkins.mvn.DefaultSettingsProvider"/>
212 <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
213 </hudson.tasks.Maven>
215 <command>rm "$HOME/.wgetrc"</command>
216 </hudson.tasks.Shell>
217 <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
219 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
220 <fileId>global-settings</fileId>
222 <variable>GLOBAL_SETTINGS_FILE</variable>
223 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
224 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
225 <fileId>gerrit-maven-project-settings</fileId>
227 <variable>SETTINGS_FILE</variable>
228 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
230 </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
233 # SPDX-License-Identifier: EPL-1.0
234 ##############################################################################
235 # Copyright (c) 2017 The Linux Foundation and others.
237 # All rights reserved. This program and the accompanying materials
238 # are made available under the terms of the Eclipse Public License v1.0
239 # which accompanies this distribution, and is available at
240 # http://www.eclipse.org/legal/epl-v10.html
241 ##############################################################################
242 # Fetches patches all projects provided by comment trigger
244 # Takes a list of Gerrit patches and fetches all projects and cherry-pick
245 # patches for projects. The trigger is
246 # 'recheck: SPACE_SEPERATED_LIST_OF_PATCHES'
248 # NOTE: This script assumes the user will provide the correct dependency order
249 # via the PATCHES list.
251 # Ensure we fail the job if any steps fail.
254 REPOS_DIR="$WORKSPACE/.repos"
256 PATCHES=($(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep 'recheck:' | awk -F: '{print $2}'))
259 for patch in $(echo "${PATCHES[@]}"); do
260 json=$(curl -s "$GERRIT_URL/changes/$patch" | sed -e "s/)]}'//")
261 project=$(echo "$json" | jq -r '.project')
262 branch=$(echo "$json" | jq -r '.branch')
264 if [ ! -d "$REPOS_DIR/$project" ]; then
265 git clone -q --depth 1 -b "$branch" "$GIT_URL/$project" "$REPOS_DIR/$project"
267 # This array will be used later to determine project build order.
268 projects+=("$project")
271 pushd "$REPOS_DIR/$project"
272 git remote add gerrit "$GIT_URL/$project"
273 git review --cherrypick="$patch"
277 # This script should be a macro which re-inject's the projects variable back
278 # into the build so a script later on can use it.
279 echo "DEPENDENCY_BUILD_ORDER=${projects[*]}" > "$WORKSPACE/.dependency.properties"
281 </hudson.tasks.Shell>
284 <propertiesFilePath>$WORKSPACE/.dependency.properties</propertiesFilePath>
289 # SPDX-License-Identifier: EPL-1.0
290 ##############################################################################
291 # Copyright (c) 2017 The Linux Foundation and others.
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 ##############################################################################
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
303 MAVEN_OPTIONS="$(echo --show-version \
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)"
309 echo "$MAVEN_OPTIONS"
312 # SPDX-License-Identifier: EPL-1.0
313 ##############################################################################
314 # Copyright (c) 2017 The Linux Foundation and others.
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 ##############################################################################
322 # Builds projects provided via $DEPENDENCY_BUILD_ORDER list
324 # This runs a `mvn clean install` against all projects provided by a list. This
325 # script is a companion script for the gerrit-fetch-dependencies script which
326 # clones project repos to "$WORKSPACE/.repos".
328 # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
329 # Ensure we fail the job if any steps fail.
333 PROJECTS=($(echo "$DEPENDENCY_BUILD_ORDER"))
334 REPOS_DIR="$WORKSPACE/.repos"
338 for project in "${PROJECTS[@]}"; do
339 pushd "$REPOS_DIR/$project"
340 # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
341 # shellcheck disable=SC2086
345 --global-settings "$GLOBAL_SETTINGS_FILE" \
346 --settings "$SETTINGS_FILE" \
347 $MAVEN_PARAMS $MAVEN_OPTIONS
351 </hudson.tasks.Shell>
354 # SPDX-License-Identifier: EPL-1.0
355 ##############################################################################
356 # Copyright (c) 2017 The Linux Foundation and others.
358 # All rights reserved. This program and the accompanying materials
359 # are made available under the terms of the Eclipse Public License v1.0
360 # which accompanies this distribution, and is available at
361 # http://www.eclipse.org/legal/epl-v10.html
362 ##############################################################################
364 # This file contains a list of variables that are generally useful in many
365 # scripts. It is meant to be sourced in other scripts so that the variables can
368 MAVEN_OPTIONS="$(echo --show-version \
371 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
372 -Dmaven.repo.local=/tmp/r \
373 -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)"
374 echo "$MAVEN_OPTIONS"
377 # SPDX-License-Identifier: EPL-1.0
378 ##############################################################################
379 # Copyright (c) 2017 The Linux Foundation and others.
381 # All rights reserved. This program and the accompanying materials
382 # are made available under the terms of the Eclipse Public License v1.0
383 # which accompanies this distribution, and is available at
384 # http://www.eclipse.org/legal/epl-v10.html
385 ##############################################################################
387 # This script builds a Maven project and deploys it into a staging repo which
388 # can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
390 # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
391 # Ensure we fail the job if any steps fail.
397 # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
398 # shellcheck disable=SC2086
400 --global-settings "$GLOBAL_SETTINGS_FILE" \
401 --settings "$SETTINGS_FILE" \
402 -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \
403 $MAVEN_PARAMS $MAVEN_OPTIONS
405 </hudson.tasks.Shell>
408 set +e # DO NOT cause build failure if any of the rm calls fail.
410 rm "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
412 # In some cases we use the lf-provide-maven-settings macro to produce
413 # a "$HOME/.netrc" file containing credentials. Remove that file here
415 rm "$HOME/.netrc"
417 # DO NOT fail build if any of the above lines fail.
420 </hudson.tasks.Shell>
423 <hudson.plugins.findbugs.FindBugsPublisher plugin="findbugs">
424 <isRankActivated>false</isRankActivated>
429 <thresholdLimit>low</thresholdLimit>
430 <pluginName>[FINDBUGS] </pluginName>
432 <canRunOnFailed>false</canRunOnFailed>
433 <useStableBuildAsReference>false</useStableBuildAsReference>
434 <usePreviousBuildAsReference>false</usePreviousBuildAsReference>
435 <useDeltaValues>false</useDeltaValues>
439 <unstableTotalNormal/>
446 <shouldDetectModules>false</shouldDetectModules>
447 <dontComputeNew>true</dontComputeNew>
448 <doNotResolveRelativePaths>false</doNotResolveRelativePaths>
450 </hudson.plugins.findbugs.FindBugsPublisher>
451 <hudson.plugins.jacoco.JacocoPublisher>
452 <execPattern>**/**.exec</execPattern>
453 <classPattern>**/classes</classPattern>
454 <sourcePattern>**/src/main/java</sourcePattern>
457 <exclusionPattern>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</exclusionPattern>
458 <maximumBranchCoverage>10</maximumBranchCoverage>
459 <minimumBranchCoverage>20</minimumBranchCoverage>
460 <maximumMethodCoverage>50</maximumMethodCoverage>
461 <minimumMethodCoverage>40</minimumMethodCoverage>
462 </hudson.plugins.jacoco.JacocoPublisher>
463 <org.jenkinsci.plugins.postbuildscript.PostBuildScript>
467 # SPDX-License-Identifier: EPL-1.0
468 ##############################################################################
469 # Copyright (c) 2017 The Linux Foundation and others.
471 # All rights reserved. This program and the accompanying materials
472 # are made available under the terms of the Eclipse Public License v1.0
473 # which accompanies this distribution, and is available at
474 # http://www.eclipse.org/legal/epl-v10.html
475 ##############################################################################
476 echo "---> sysstat.sh"
477 set +e # DON'T fail build if script fails.
479 OS=$(facter operatingsystem)
480 case "$OS" in
482 SYSSTAT_PATH="/var/log/sysstat"
484 # Dont run the script when systat is not enabled by default
485 if ! grep --quiet 'ENABLED="true"' "/etc/default/sysstat"; then
490 SYSSTAT_PATH="/var/log/sa"
498 SAR_DIR="$WORKSPACE/archives/sar-reports"
499 mkdir -p "$SAR_DIR"
500 cp "$SYSSTAT_PATH/"* "$_"
501 # convert sar data to ascii format
502 while IFS="" read -r s
504 [ -f "$s" ] && LC_TIME=POSIX sar -A -f "$s" > "$SAR_DIR/sar${s//[!0-9]/}"
505 done < <(find "$SYSSTAT_PATH" -name "sa[0-9]*" || true)
507 # DON'T fail build if script fails.
510 </hudson.tasks.Shell>
511 <org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep plugin="config-file-provider">
513 <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
514 <fileId>jenkins-log-archives-settings</fileId>
516 <variable>SETTINGS_FILE</variable>
517 </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
519 </org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
522 <propertiesContent>SERVER_ID=logs</propertiesContent>
527 # SPDX-License-Identifier: EPL-1.0
528 ##############################################################################
529 # Copyright (c) 2017 The Linux Foundation and others.
531 # All rights reserved. This program and the accompanying materials
532 # are made available under the terms of the Eclipse Public License v1.0
533 # which accompanies this distribution, and is available at
534 # http://www.eclipse.org/legal/epl-v10.html
535 ##############################################################################
536 echo "---> create-netrc.sh"
538 # Ensure we fail the job if any steps fail.
541 NEXUS_URL="${NEXUS_URL:-$NEXUSPROXY}"
542 CREDENTIAL=$(xmlstarlet sel -N "x=http://maven.apache.org/SETTINGS/1.0.0" \
543 -t -m "/x:settings/x:servers/x:server[x:id='${SERVER_ID}']" \
544 -v x:username -o ":" -v x:password \
545 "$SETTINGS_FILE")
547 machine=$(echo "$NEXUS_URL" | awk -F/ '{print $3}')
548 user=$(echo "$CREDENTIAL" | cut -f1 -d:)
549 pass=$(echo "$CREDENTIAL" | cut -f2 -d:)
551 echo "machine $machine login $user password $pass" > ~/.netrc
553 </hudson.tasks.Shell>
556 # SPDX-License-Identifier: EPL-1.0
557 ##############################################################################
558 # Copyright (c) 2017 The Linux Foundation and others.
560 # All rights reserved. This program and the accompanying materials
561 # are made available under the terms of the Eclipse Public License v1.0
562 # which accompanies this distribution, and is available at
563 # http://www.eclipse.org/legal/epl-v10.html
564 ##############################################################################
565 echo "---> lftools-install.sh"
567 # Script to install lftools via a version passed in via lf-infra-parameters
569 # Required parameters:
571 # LFTOOLS_VERSION: Passed in via lf-infra-parameters configuration. Can be
572 # set to a strict version number like '1.2.3' or using
573 # PEP-440 definitions.
577 # >=1.0.0,<2.0.0
579 # By default a released version of lftools should always be used.
580 # The purpose of the 2 variables below is so that lftools devs can test
581 # unreleased versions of lftools. There are 2 methods to install a dev version
584 # 1) gerrit patch: Used to test a patch that has not yet been merged.
585 # To do this set something like this:
586 # LFTOOLS_MODE=gerrit
587 # LFTOOLS_REFSPEC=refs/changes/96/5296/7
589 # 2) git branch: Used to install an lftools version from a specific branch.
590 # To use this set the variables as follows:
592 # LFTOOLS_REFSPEC=master
594 # 3) release : The intended use case and default setting.
595 # Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused.
597 LFTOOLS_MODE=release # release | git | gerrit
598 LFTOOLS_REFSPEC=master
600 # Ensure we fail the job if any steps fail.
601 # DO NOT set -u as virtualenv's activate script has unbound variables
604 virtualenv --quiet "/tmp/v/lftools"
605 # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
606 source "/tmp/v/lftools/bin/activate"
607 pip install --quiet --upgrade pip
609 case $LFTOOLS_MODE in
611 git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools
613 git fetch origin "$LFTOOLS_REFSPEC"
614 git checkout FETCH_HEAD
615 pip install --quiet --upgrade -r requirements.txt
616 pip install --quiet --upgrade -e .
621 pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@"$BRANCH"
625 if [[ $LFTOOLS_VERSION =~ ^[0-9] ]]; then
626 LFTOOLS_VERSION="==$LFTOOLS_VERSION"
629 pip install --quiet --upgrade "lftools${LFTOOLS_VERSION}"
635 # pipdeptree prints out a lot of information because lftools pulls in many
636 # dependencies. Let's only print it if we want to debug.
637 # echo "----> Pip Dependency Tree"
638 # pip install --quiet --upgrade pipdeptree
642 # SPDX-License-Identifier: EPL-1.0
643 ##############################################################################
644 # Copyright (c) 2017 The Linux Foundation and others.
646 # All rights reserved. This program and the accompanying materials
647 # are made available under the terms of the Eclipse Public License v1.0
648 # which accompanies this distribution, and is available at
649 # http://www.eclipse.org/legal/epl-v10.html
650 ##############################################################################
651 echo "---> logs-deploy.sh"
653 # Ensure we fail the job if any steps fail.
656 set -x # Trace commands for this script to make debugging easier.
658 ARCHIVE_ARTIFACTS="${ARCHIVE_ARTIFACTS:-}"
659 LOGS_SERVER="${LOGS_SERVER:-None}"
661 if [ "${LOGS_SERVER}" == 'None' ]
663 set +x # Disable trace since we no longer need it
665 echo "WARNING: Logging server not set"
667 NEXUS_URL="${NEXUS_URL:-$NEXUSPROXY}"
668 NEXUS_PATH="${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}"
669 BUILD_URL="${BUILD_URL}"
671 lftools deploy archives -p "$ARCHIVE_ARTIFACTS" "$NEXUS_URL" "$NEXUS_PATH" "$WORKSPACE"
672 lftools deploy logs "$NEXUS_URL" "$NEXUS_PATH" "$BUILD_URL"
674 set +x # Disable trace since we no longer need it.
676 echo "Build logs: <a href=\"$LOGS_SERVER/$NEXUS_PATH\">$LOGS_SERVER/$NEXUS_PATH</a>"
679 </hudson.tasks.Shell>
682 # SPDX-License-Identifier: EPL-1.0
683 ##############################################################################
684 # Copyright (c) 2017 The Linux Foundation and others.
686 # All rights reserved. This program and the accompanying materials
687 # are made available under the terms of the Eclipse Public License v1.0
688 # which accompanies this distribution, and is available at
689 # http://www.eclipse.org/legal/epl-v10.html
690 ##############################################################################
692 # Clear log credential files
693 rm "$SETTINGS_FILE"
696 </hudson.tasks.Shell>
697 <hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
698 <regexp>^Build logs: .*</regexp>
699 </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
701 <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
702 <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
703 <markBuildUnstable>false</markBuildUnstable>
704 </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
705 <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup">
707 <hudson.plugins.ws__cleanup.Pattern>
708 <pattern>**/*.jenkins-trigger</pattern>
710 </hudson.plugins.ws__cleanup.Pattern>
712 <deleteDirs>false</deleteDirs>
713 <cleanupMatrixParent>false</cleanupMatrixParent>
715 <cleanWhenSuccess>true</cleanWhenSuccess>
716 <cleanWhenUnstable>true</cleanWhenUnstable>
717 <cleanWhenFailure>true</cleanWhenFailure>
718 <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
719 <cleanWhenAborted>true</cleanWhenAborted>
720 <notFailBuild>true</notFailBuild>
721 </hudson.plugins.ws__cleanup.WsCleanup>
724 <com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper/>
725 <hudson.plugins.build__timeout.BuildTimeoutWrapper>
726 <timeoutMinutes>60</timeoutMinutes>
727 <timeoutEnvVar>BUILD_TIMEOUT</timeoutEnvVar>
728 <failBuild>true</failBuild>
729 <writingDescription>false</writingDescription>
730 <timeoutPercentage>0</timeoutPercentage>
731 <timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
732 <timeoutType>absolute</timeoutType>
733 </hudson.plugins.build__timeout.BuildTimeoutWrapper>
734 <hudson.plugins.timestamper.TimestamperBuildWrapper/>
735 <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
736 <user>test-credential</user>
737 </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
738 <jenkins.plugins.openstack.compute.JCloudsOneOffSlave/>