Zad 03.Jenkins - BUILD_SELECTOR
This commit is contained in:
parent
7440bb587d
commit
ea5f7a6a04
@ -1,5 +1,12 @@
|
||||
pipeline {
|
||||
agent any
|
||||
parameters {
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying artifacts',
|
||||
name: 'BUILD_SELECTOR'
|
||||
)
|
||||
}
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
@ -8,7 +15,7 @@ pipeline {
|
||||
}
|
||||
stage('Copy artifacts') {
|
||||
steps {
|
||||
copyArtifacts fingerprintArtifacts: true, projectName: 's470623-create-dataset', selector: lastSuccessful()
|
||||
copyArtifacts fingerprintArtifacts: true, projectName: 's470623-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||
sh 'chmod u+x ./stats.sh'
|
||||
sh './stats.sh'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user