How to start a pipeline multiple times

15 views
Skip to first unread message

Maryam and Papa

unread,
Sep 21, 2017, 7:20:13 AM9/21/17
to Jenkins Users
I want to repeat the execution of a pipeline multiple times.

I tried: 

pipeline.groovy:

for(i=0;i<5;++i)
{
   startPipeline()
}

I got a very long pipeline where the stages are 5 time repeated.

stage1 ------ stage2 -------- stage1 ------ stage2 -------- stage1 ------ stage2 -------- stage1 ------ stage2 -------- stage1 ------ stage2 --------

But I want 5 pipelines executing sequentially 
stage1 ------ stage2 -------- 
(pipeline1 finished, success or failure)
stage1 ------ stage2 --------
(pipeline2 finished, success or failure)
stage1 ------ stage2 --------
(pipeline3 finished, success or failure)
stage1 ------ stage2 --------
(pipeline4 finished, success or failure)
stage1 ------ stage2 --------


is this possible?
Reply all
Reply to author
Forward
0 new messages