On Tue, Mar 15, 2016 at 10:19:51AM +0100, Niels de Vos wrote:
On Tue, Mar 15, 2016 at 08:37:11AM +0000, Dominic Cleal wrote:
On 15/03/16 08:06, Niels de Vos wrote:
Hi,
I would like to run a Jenkins job on a regular schedule, and this job should run with different CentOS and Gluster versions. It is easy to write the job and pass the different environment. This works fine for manual execution with the Jenkins web interface
Now, is there a trick or job-type in Jenkins that I can use to setup a schedule *and* pass different environment parameters for different times?
The workaround would be to create multiple Jenkins jobs with different default parameters... But I do not think that is a very elegant solution.
Similarly to that, the way I usually do this is to create multiple Jenkins jobs that call the first job with different sets of parameters, using the original as a shared utility job.
As the main build step, use "Trigger/call builds on other projects", enter the project name and then click "Add parameters", "Predefined parameters" to enter a key=value list of parameters to pass through. You can then add your notifications to this top-level task instead of the inner one.
The downside is that it takes up an additional slave slot with the top-level job that's just waiting for another job to complete. It also requires you to click through an additional page to view the results of the inner job.
Nice, this looks pretty easy to setup. I'll try that first.
This is working nicely for the last days now. I've setup two jobs:
1. run the test based on several parameters 2. a periodic scheduled job that starts (1) multiple times, with different parameters (does not wait for (1) to finish, jobs get queued and will run independently)
If more variations are needed, it is easy to add them to the 2nd job.
Thanks to all who shared their ideas! Niels