0

I am using a Jenkins pipeline to process files for a UAT. Stages are like:

  1. Get the files
  2. Put them in the right directory
  3. Run bash script
  4. Run another bash script
  5. Run another bash script
  6. Send results

I would like to be able to run 1 or more times this pipeline based on the number of EODs I want to run.

So if EODs are:

20180720, 20180721, 20180722

I want the pipeline to run 3 times.

So;

for eod in '20180720, 20180721, 20180722'
run pipeline $eod
done

I know you can launch it with the url and parameters like John mentions below, and I am looking for a more simple solution, if there is any.

How can I do this?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Jeroen
  • 1
  • 2
  • Have you looked at this: https://stackoverflow.com/questions/20359810/how-to-trigger-jenkins-builds-remotely-and-to-pass-parameters – John Aug 01 '18 at 22:39
  • Hi John, Thanks for your reaction! I already have looked at this option, and though it might work, I am hoping there is a more simple solution where you can just loop trough pipeline's. – Jeroen Aug 02 '18 at 04:41
  • Where do you get the EOD values from? Without knowing any more details I’d say you can either use a simple loop or trigger another build of yourself using the build step. – Joerg S Aug 02 '18 at 06:24
  • Hi Joerg, the EOD values should be parsed manually for it changes with every UAT you run. So lets say you have a UAT for 20180720, 20180721, 20180722, you pass these arguments once and it will loop trough those dates. Per EOD you need a whole pipeline and it should start after the last EOD is finished. – Jeroen Aug 02 '18 at 06:46
  • Parameters is the simplest solution you can get... just wrap your pipeline in a loop so that you can iterate for each EOD. – towel Aug 19 '18 at 13:07

0 Answers0