0

I have a Jenkins job with several parameters, each with default value, for example:

SUITE_NAME: business/common.xml     
BROWSER_NAME: ff

I need the job to be started 2 times by cron, with different input parameters, like:

1st launch: 5AM

SUITE_NAME: business/common.xml
BROWSER_NAME: ff

2st launch: 7AM

SUITE_NAME: events/some-other.xml
BROWSER_NAME: ff

So SUITE_NAME and probably some other parameters could vary. How can I set this in the pipeline scrip of in job settings via Jenkins interface?

The only solution I see now is to trigger the build each hour, get current time, and change the value of SUITE_NAME depending on whether it's 5AM or 7AM but this really looks weird.

thanks in advance.

Bohdan Nesteruk
  • 794
  • 17
  • 42

1 Answers1

0

Solved by using this answer and plugin:

add build parameter in jenkins build schedule

https://github.com/jwmach1/parameterized-scheduler

00 05 * * 1-5 %SUITE_NAME=business/common.xml
05 05 * * 1-5 %SUITE_NAME=events/some-other.xml

etc...

Bohdan Nesteruk
  • 794
  • 17
  • 42