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.
Thanks, Niels
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.
[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
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, but jobs may get delayed if the slave is busy. Maybe it is not exactly a reliable solution?
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
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?"
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 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
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
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.
A second way of doing it is to create a matrix job (you can't change an existing job) and add the different parameters values as an axis on the matrix. This works well when testing different combinations, e.g. software versions, database types. The job would run all of the combinations either in parallel or sequentially depending on configuration, not at different times of the day.
Lastly, the duplication of jobs is much easier to manage if you use Jenkins Job Builder (JJB) or similar to generate your jobs from config files. You can define the job as a template in a single file and although Jenkins will contain multiple jobs all with identical configuration steps, there's no extra work to keep them in sync when using the tool to manage the job configurations.
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.
A second way of doing it is to create a matrix job (you can't change an existing job) and add the different parameters values as an axis on the matrix. This works well when testing different combinations, e.g. software versions, database types. The job would run all of the combinations either in parallel or sequentially depending on configuration, not at different times of the day.
This might be what I want, but it looks more complex to configure. I might change to this when I understand better how it works.
Lastly, the duplication of jobs is much easier to manage if you use Jenkins Job Builder (JJB) or similar to generate your jobs from config files. You can define the job as a template in a single file and although Jenkins will contain multiple jobs all with identical configuration steps, there's no extra work to keep them in sync when using the tool to manage the job configurations.
Yeah, I thought about that too. But I have no experience with JBB and it would create many different, but almost the same Jenkins jobs. Even if the jobs are managed outside of the Jenkins webui, it feels a little like polluting the environment.
Thanks for the suggestions! Niels
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