Manoj Deshpande
Manoj Deshpande

Reputation: 47

Parameterized Scheduler with File parameters - Jenkins

I pass multiple files as parameters to my jenkins job. I have scheduled the job to run at regular intervals. I have installed the parameterized-scheduler plugin but I am unable to figure out the syntax for scheduling the job with the files as parameters.

If my file names are a.js, b.js, c.js. What would be the syntax for me to use the parameterized scheduler?

Is there another approach to solving this issue?

Upvotes: 0

Views: 542

Answers (2)

Manoj Deshpande
Manoj Deshpande

Reputation: 47

I could not find an answer to this question although I have found a better approach.

The right way to solve this problem is to upload the files on a cloud repository that can be downloaded/cloned to the workspace during a build and then use the files.

So, I have uploaded the files to a github repo which I am cloning during a build and using them.

Upvotes: 0

Sourav
Sourav

Reputation: 3392

Syntax for parametrized scheduler:

*/2 * * * * %FILE=a.js
1-59/2 * * * * %FILE=b.js
* * * * * %FILE=c.js

Here, FILE is string parameter which accepts the name of file.

Note: Please change the interval accordingly.

Upvotes: 1

Related Questions