Multiple stages with sequential dynamic stages.
This commit is contained in:
parent
9069a7acc6
commit
a5c650ec9c
|
@ -1,5 +1,5 @@
|
|||
def apps = "app1,app2,app3".split(",").findAll { it }.collect { it.trim() }
|
||||
def jobs = "job1,job2,job3,job4,job5".split(",").findAll { it }.collect { it.trim() }
|
||||
def apps = "SmartGears,Enabling,Data".split(",").findAll { it }.collect { it.trim() }
|
||||
def jobs = "maven-parent,gcube-bom,job3,job4,job5".split(",").findAll { it }.collect { it.trim() }
|
||||
|
||||
def environment = env.ENVIRONMENT
|
||||
def version = env.VERSION
|
||||
|
@ -11,7 +11,7 @@ if (apps.size() < 1) {
|
|||
|
||||
for (int i = 0; i < apps.size(); i++) {
|
||||
def app = apps[i]
|
||||
dynamicStages["stage-${app}"] = ['first':{
|
||||
dynamicStages["stage-${app}"] = ["${app}":{
|
||||
node {
|
||||
stage("Build ${app}") {
|
||||
for (int i2 = 0; i2 < jobs.size(); i2++) {
|
||||
|
@ -25,10 +25,25 @@ for (int i = 0; i < apps.size(); i++) {
|
|||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
stage('Build apps(s)') {
|
||||
stage('Build SmartGears components') {
|
||||
steps {
|
||||
script {
|
||||
parallel dynamicStages['stage-app1']
|
||||
parallel dynamicStages['stage-SmartGears']
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build enabling components') {
|
||||
steps {
|
||||
script {
|
||||
parallel dynamicStages['stage-Enabling']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build data components') {
|
||||
steps {
|
||||
script {
|
||||
parallel dynamicStages['stage-Data']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue