From 9069a7acc6a0d7789b55279550f042117bfc926e Mon Sep 17 00:00:00 2001 From: Manuele Simi Date: Thu, 22 Aug 2019 20:37:52 -0400 Subject: [PATCH] Build one stage as parallel stage (to make it dynamic). --- examples/dynamyc_sequential_stages | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/dynamyc_sequential_stages b/examples/dynamyc_sequential_stages index c4b285e..b5e52f2 100644 --- a/examples/dynamyc_sequential_stages +++ b/examples/dynamyc_sequential_stages @@ -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'] } } }