Build one stage as parallel stage (to make it dynamic).

This commit is contained in:
Manuele Simi 2019-08-22 20:37:52 -04:00
parent fef59450af
commit 9069a7acc6
1 changed files with 3 additions and 3 deletions

View File

@ -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']
}
}
}