Build one stage as parallel stage (to make it dynamic).
This commit is contained in:
parent
fef59450af
commit
9069a7acc6
|
@ -11,7 +11,7 @@ if (apps.size() < 1) {
|
|||
|
||||
for (int i = 0; i < apps.size(); i++) {
|
||||
def app = apps[i]
|
||||
dynamicStages["stage-${app}"] = {
|
||||
dynamicStages["stage-${app}"] = ['first':{
|
||||
node {
|
||||
stage("Build ${app}") {
|
||||
for (int i2 = 0; i2 < jobs.size(); i2++) {
|
||||
|
@ -19,7 +19,7 @@ for (int i = 0; i < apps.size(); i++) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
pipeline {
|
||||
|
@ -28,7 +28,7 @@ pipeline {
|
|||
stage('Build apps(s)') {
|
||||
steps {
|
||||
script {
|
||||
parallel dynamicStages
|
||||
parallel dynamicStages['stage-app1']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue