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