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++) {
|
for (int i = 0; i < apps.size(); i++) {
|
||||||
def app = apps[i]
|
def app = apps[i]
|
||||||
dynamicStages["stage-${app}"] = {
|
dynamicStages["stage-${app}"] = ['first':{
|
||||||
node {
|
node {
|
||||||
stage("Build ${app}") {
|
stage("Build ${app}") {
|
||||||
for (int i2 = 0; i2 < jobs.size(); i2++) {
|
for (int i2 = 0; i2 < jobs.size(); i2++) {
|
||||||
|
@ -19,7 +19,7 @@ for (int i = 0; i < apps.size(); i++) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
|
@ -28,7 +28,7 @@ pipeline {
|
||||||
stage('Build apps(s)') {
|
stage('Build apps(s)') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
parallel dynamicStages
|
parallel dynamicStages['stage-app1']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue