Skip to content

Commit b98d04f

Browse files
committed
build param
1 parent f9ee1cf commit b98d04f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

test/groovy/LRS_libci_pipeline.groovy

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ pipeline {
1919
description: 'Jenkins job for artifacts to be installed on target agent',
2020
defaultValue: "D4xx_Kernel_Module_Jetson_JP6"
2121
)
22+
string(
23+
name: 'BUILD',
24+
description: 'Build number for artifacts. Leave empty for last successful'
25+
)
2226
}
2327

2428
stages {
@@ -28,9 +32,17 @@ pipeline {
2832
}
2933
steps {
3034
script {
35+
def buildSelector
36+
if (params.BUILD?.trim()) {
37+
buildSelector = specific(params.BUILD)
38+
} else {
39+
buildSelector = lastSuccessful()
40+
}
41+
3142
copyArtifacts filter: '**/*.tar.bz2',
3243
projectName: params.ARTIFACTS,
3344
flatten: true,
45+
selector: buildSelector,
3446
target: 'artifacts/'
3547
}
3648
}
@@ -41,6 +53,7 @@ pipeline {
4153
}
4254
steps {
4355
sh """#!/bin/sh
56+
rm -rf lib/modules
4457
tar -xf artifacts/rootfs.tar.bz2
4558
# external script on agent to install artifacts
4659
sudo install.tegra.artifacts.sh

0 commit comments

Comments
 (0)