On Tue, Mar 15, 2016 at 11:41:47AM +0200, Arie Bregman wrote:
On Tue, Mar 15, 2016 at 11:00 AM, Niels de Vos ndevos@redhat.com wrote:
On Tue, Mar 15, 2016 at 10:25:19AM +0200, Arie Bregman wrote:
On Tue, Mar 15, 2016 at 10:06 AM, Niels de Vos ndevos@redhat.com 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.
You may want to look into Dynamic Parameter plugin[1]
Anther workaround (or solution?) would be to check the time by yourself in 'virtualenv builder'/shell and set the parameters accordingly.
Oh, thanks for the idea. Doing something time based would be an option,
Isn't time based is what you wanted? "pass different environment parameters for different times?"
Maybe I phrased it a bit unclear. I want to do scheduled jobs that run at certain times. The job that gets scheduled should have some environment parameters set. A different scheduled job (can be at the same time too) should have other environment parameters.
Selecting parameters based on the time was not something I considered, but it could be used to address my needs.
but jobs may get delayed if the slave is busy. Maybe it is not exactly a reliable solution?
Jobs may get delayed in any case, whether it's one job scheduled for different hours or multiple jobs that call one job. This is probably the easier solution to maintain.
I think a "MultiJob Project" job in Jenkins is most straight forward. It allows to run at a schedule, and it can start other jobs with pre-defined parameters. It can also run the same job several times, with different parameters. Thanks for thinking about this problem with me!
Niels
I might take this approach if there are no other suggestions.
Niels
[1] https://wiki.jenkins-ci.org/display/JENKINS/Dynamic+Parameter+Plug-in
Thanks, Niels _______________________________________________ Ci-users mailing list Ci-users@centos.org https://lists.centos.org/mailman/listinfo/ci-users