Skip to content

Commit 646fe6a

Browse files
committed
build param
1 parent f9ee1cf commit 646fe6a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/groovy/LRS_libci_pipeline.groovy

Lines changed: 12 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
}

0 commit comments

Comments
 (0)