add build parameter in jenkins build schedule
I have a jenkins job. i want to build my job in a specific time with a build parameter.
I want to do this by using the Build periodically
option.
I have input like this:
*/1 * * * * Parameter1
If I do this, jenkins show an error.
Is this possible without using any plugin.
if not, than which plugin will be better
Alternatively is there a way to give parameter's here in the schedule?
My actual requirement is like this:
build in morning using one parameter
build in evening using another parameter.
jenkins jenkins-plugins
add a comment |
I have a jenkins job. i want to build my job in a specific time with a build parameter.
I want to do this by using the Build periodically
option.
I have input like this:
*/1 * * * * Parameter1
If I do this, jenkins show an error.
Is this possible without using any plugin.
if not, than which plugin will be better
Alternatively is there a way to give parameter's here in the schedule?
My actual requirement is like this:
build in morning using one parameter
build in evening using another parameter.
jenkins jenkins-plugins
add a comment |
I have a jenkins job. i want to build my job in a specific time with a build parameter.
I want to do this by using the Build periodically
option.
I have input like this:
*/1 * * * * Parameter1
If I do this, jenkins show an error.
Is this possible without using any plugin.
if not, than which plugin will be better
Alternatively is there a way to give parameter's here in the schedule?
My actual requirement is like this:
build in morning using one parameter
build in evening using another parameter.
jenkins jenkins-plugins
I have a jenkins job. i want to build my job in a specific time with a build parameter.
I want to do this by using the Build periodically
option.
I have input like this:
*/1 * * * * Parameter1
If I do this, jenkins show an error.
Is this possible without using any plugin.
if not, than which plugin will be better
Alternatively is there a way to give parameter's here in the schedule?
My actual requirement is like this:
build in morning using one parameter
build in evening using another parameter.
jenkins jenkins-plugins
jenkins jenkins-plugins
edited Jan 4 '16 at 15:59
Eric Ipsum
asked Jan 4 '16 at 15:40
Eric IpsumEric Ipsum
1901315
1901315
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Basically, with the Build periodically option you can't schedule a Jenkins job with parameters.
However, to schedule a job at different times that needs to use different environments, you've to use the parameterized-scheduler plugin as mentioned above https://github.com/jwmach1/parameterized-scheduler or search it in
(Manage Jenkins -> Manage Plugins -> Parameterized Scheduler). so it'll be like
#Parameter1
H/15 * * * * %Parameter1
#Parameter2
H/30 * * * * %Parameter2
Remember you have to have your parameters already setup because the plugin is visible only for jobs with parameters.
The Node and Label parameter plugin can help since it allows you to select individual nodes assuming your different servers qa1 and qa2 are already configured. Hope that clarifies things for you.
1
Hum, it's the same solution I provided before you :( (see my post + my comment)
– Bruno Lavit
Jan 5 '16 at 8:25
u have got super solution from Claudio and Bruno...:). To build on morning 10.30am : cron job will b like this: 30 10 * * * %build_param=value To build on evening 6:30pm: cron job will b like this: 30 18 * * * %build_param=value
– noor
Jan 5 '16 at 11:25
2
Now it's an official plugin: wiki.jenkins.io/display/JENKINS/Parameterized+Scheduler+Plugin
– VadimBelov
Jan 25 '18 at 15:16
add a comment |
With the native Jenkins crontab, it's not possible.
But it should be possible with this plugin:
https://github.com/jwmach1/parameterized-scheduler
You have to fork the repo and build this plugin + do a manual installation.
This tutorial explains how to build a custom plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
(Setting Up Environment + Building a Plugin)
thanks for your wise suggestion. But is this possible to use like this : H/15 * * * * %Server=qa1 H/30 * * * * %Server=qa2 I want to give two schedule in different server.
– Eric Ipsum
Jan 4 '16 at 16:19
or use any if else condition like execute at morning in qa1 server and in others time execute in qa2 server
– Eric Ipsum
Jan 4 '16 at 16:23
Maybe you can try to mix my solution with this plugin: wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin. It allows to manage the node name with a parameter.
– Bruno Lavit
Jan 4 '16 at 16:28
add a comment |
Without plugins, you can try cloning the job, and creating a build schedule with different parameter values. I.e. you might have job_morning
and job_evening
.
See How do I clone a job in jenkins?
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34594703%2fadd-build-parameter-in-jenkins-build-schedule%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Basically, with the Build periodically option you can't schedule a Jenkins job with parameters.
However, to schedule a job at different times that needs to use different environments, you've to use the parameterized-scheduler plugin as mentioned above https://github.com/jwmach1/parameterized-scheduler or search it in
(Manage Jenkins -> Manage Plugins -> Parameterized Scheduler). so it'll be like
#Parameter1
H/15 * * * * %Parameter1
#Parameter2
H/30 * * * * %Parameter2
Remember you have to have your parameters already setup because the plugin is visible only for jobs with parameters.
The Node and Label parameter plugin can help since it allows you to select individual nodes assuming your different servers qa1 and qa2 are already configured. Hope that clarifies things for you.
1
Hum, it's the same solution I provided before you :( (see my post + my comment)
– Bruno Lavit
Jan 5 '16 at 8:25
u have got super solution from Claudio and Bruno...:). To build on morning 10.30am : cron job will b like this: 30 10 * * * %build_param=value To build on evening 6:30pm: cron job will b like this: 30 18 * * * %build_param=value
– noor
Jan 5 '16 at 11:25
2
Now it's an official plugin: wiki.jenkins.io/display/JENKINS/Parameterized+Scheduler+Plugin
– VadimBelov
Jan 25 '18 at 15:16
add a comment |
Basically, with the Build periodically option you can't schedule a Jenkins job with parameters.
However, to schedule a job at different times that needs to use different environments, you've to use the parameterized-scheduler plugin as mentioned above https://github.com/jwmach1/parameterized-scheduler or search it in
(Manage Jenkins -> Manage Plugins -> Parameterized Scheduler). so it'll be like
#Parameter1
H/15 * * * * %Parameter1
#Parameter2
H/30 * * * * %Parameter2
Remember you have to have your parameters already setup because the plugin is visible only for jobs with parameters.
The Node and Label parameter plugin can help since it allows you to select individual nodes assuming your different servers qa1 and qa2 are already configured. Hope that clarifies things for you.
1
Hum, it's the same solution I provided before you :( (see my post + my comment)
– Bruno Lavit
Jan 5 '16 at 8:25
u have got super solution from Claudio and Bruno...:). To build on morning 10.30am : cron job will b like this: 30 10 * * * %build_param=value To build on evening 6:30pm: cron job will b like this: 30 18 * * * %build_param=value
– noor
Jan 5 '16 at 11:25
2
Now it's an official plugin: wiki.jenkins.io/display/JENKINS/Parameterized+Scheduler+Plugin
– VadimBelov
Jan 25 '18 at 15:16
add a comment |
Basically, with the Build periodically option you can't schedule a Jenkins job with parameters.
However, to schedule a job at different times that needs to use different environments, you've to use the parameterized-scheduler plugin as mentioned above https://github.com/jwmach1/parameterized-scheduler or search it in
(Manage Jenkins -> Manage Plugins -> Parameterized Scheduler). so it'll be like
#Parameter1
H/15 * * * * %Parameter1
#Parameter2
H/30 * * * * %Parameter2
Remember you have to have your parameters already setup because the plugin is visible only for jobs with parameters.
The Node and Label parameter plugin can help since it allows you to select individual nodes assuming your different servers qa1 and qa2 are already configured. Hope that clarifies things for you.
Basically, with the Build periodically option you can't schedule a Jenkins job with parameters.
However, to schedule a job at different times that needs to use different environments, you've to use the parameterized-scheduler plugin as mentioned above https://github.com/jwmach1/parameterized-scheduler or search it in
(Manage Jenkins -> Manage Plugins -> Parameterized Scheduler). so it'll be like
#Parameter1
H/15 * * * * %Parameter1
#Parameter2
H/30 * * * * %Parameter2
Remember you have to have your parameters already setup because the plugin is visible only for jobs with parameters.
The Node and Label parameter plugin can help since it allows you to select individual nodes assuming your different servers qa1 and qa2 are already configured. Hope that clarifies things for you.
answered Jan 4 '16 at 20:54
Claudio AClaudio A
1415
1415
1
Hum, it's the same solution I provided before you :( (see my post + my comment)
– Bruno Lavit
Jan 5 '16 at 8:25
u have got super solution from Claudio and Bruno...:). To build on morning 10.30am : cron job will b like this: 30 10 * * * %build_param=value To build on evening 6:30pm: cron job will b like this: 30 18 * * * %build_param=value
– noor
Jan 5 '16 at 11:25
2
Now it's an official plugin: wiki.jenkins.io/display/JENKINS/Parameterized+Scheduler+Plugin
– VadimBelov
Jan 25 '18 at 15:16
add a comment |
1
Hum, it's the same solution I provided before you :( (see my post + my comment)
– Bruno Lavit
Jan 5 '16 at 8:25
u have got super solution from Claudio and Bruno...:). To build on morning 10.30am : cron job will b like this: 30 10 * * * %build_param=value To build on evening 6:30pm: cron job will b like this: 30 18 * * * %build_param=value
– noor
Jan 5 '16 at 11:25
2
Now it's an official plugin: wiki.jenkins.io/display/JENKINS/Parameterized+Scheduler+Plugin
– VadimBelov
Jan 25 '18 at 15:16
1
1
Hum, it's the same solution I provided before you :( (see my post + my comment)
– Bruno Lavit
Jan 5 '16 at 8:25
Hum, it's the same solution I provided before you :( (see my post + my comment)
– Bruno Lavit
Jan 5 '16 at 8:25
u have got super solution from Claudio and Bruno...:). To build on morning 10.30am : cron job will b like this: 30 10 * * * %build_param=value To build on evening 6:30pm: cron job will b like this: 30 18 * * * %build_param=value
– noor
Jan 5 '16 at 11:25
u have got super solution from Claudio and Bruno...:). To build on morning 10.30am : cron job will b like this: 30 10 * * * %build_param=value To build on evening 6:30pm: cron job will b like this: 30 18 * * * %build_param=value
– noor
Jan 5 '16 at 11:25
2
2
Now it's an official plugin: wiki.jenkins.io/display/JENKINS/Parameterized+Scheduler+Plugin
– VadimBelov
Jan 25 '18 at 15:16
Now it's an official plugin: wiki.jenkins.io/display/JENKINS/Parameterized+Scheduler+Plugin
– VadimBelov
Jan 25 '18 at 15:16
add a comment |
With the native Jenkins crontab, it's not possible.
But it should be possible with this plugin:
https://github.com/jwmach1/parameterized-scheduler
You have to fork the repo and build this plugin + do a manual installation.
This tutorial explains how to build a custom plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
(Setting Up Environment + Building a Plugin)
thanks for your wise suggestion. But is this possible to use like this : H/15 * * * * %Server=qa1 H/30 * * * * %Server=qa2 I want to give two schedule in different server.
– Eric Ipsum
Jan 4 '16 at 16:19
or use any if else condition like execute at morning in qa1 server and in others time execute in qa2 server
– Eric Ipsum
Jan 4 '16 at 16:23
Maybe you can try to mix my solution with this plugin: wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin. It allows to manage the node name with a parameter.
– Bruno Lavit
Jan 4 '16 at 16:28
add a comment |
With the native Jenkins crontab, it's not possible.
But it should be possible with this plugin:
https://github.com/jwmach1/parameterized-scheduler
You have to fork the repo and build this plugin + do a manual installation.
This tutorial explains how to build a custom plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
(Setting Up Environment + Building a Plugin)
thanks for your wise suggestion. But is this possible to use like this : H/15 * * * * %Server=qa1 H/30 * * * * %Server=qa2 I want to give two schedule in different server.
– Eric Ipsum
Jan 4 '16 at 16:19
or use any if else condition like execute at morning in qa1 server and in others time execute in qa2 server
– Eric Ipsum
Jan 4 '16 at 16:23
Maybe you can try to mix my solution with this plugin: wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin. It allows to manage the node name with a parameter.
– Bruno Lavit
Jan 4 '16 at 16:28
add a comment |
With the native Jenkins crontab, it's not possible.
But it should be possible with this plugin:
https://github.com/jwmach1/parameterized-scheduler
You have to fork the repo and build this plugin + do a manual installation.
This tutorial explains how to build a custom plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
(Setting Up Environment + Building a Plugin)
With the native Jenkins crontab, it's not possible.
But it should be possible with this plugin:
https://github.com/jwmach1/parameterized-scheduler
You have to fork the repo and build this plugin + do a manual installation.
This tutorial explains how to build a custom plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
(Setting Up Environment + Building a Plugin)
answered Jan 4 '16 at 16:00
Bruno LavitBruno Lavit
7,48121933
7,48121933
thanks for your wise suggestion. But is this possible to use like this : H/15 * * * * %Server=qa1 H/30 * * * * %Server=qa2 I want to give two schedule in different server.
– Eric Ipsum
Jan 4 '16 at 16:19
or use any if else condition like execute at morning in qa1 server and in others time execute in qa2 server
– Eric Ipsum
Jan 4 '16 at 16:23
Maybe you can try to mix my solution with this plugin: wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin. It allows to manage the node name with a parameter.
– Bruno Lavit
Jan 4 '16 at 16:28
add a comment |
thanks for your wise suggestion. But is this possible to use like this : H/15 * * * * %Server=qa1 H/30 * * * * %Server=qa2 I want to give two schedule in different server.
– Eric Ipsum
Jan 4 '16 at 16:19
or use any if else condition like execute at morning in qa1 server and in others time execute in qa2 server
– Eric Ipsum
Jan 4 '16 at 16:23
Maybe you can try to mix my solution with this plugin: wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin. It allows to manage the node name with a parameter.
– Bruno Lavit
Jan 4 '16 at 16:28
thanks for your wise suggestion. But is this possible to use like this : H/15 * * * * %Server=qa1 H/30 * * * * %Server=qa2 I want to give two schedule in different server.
– Eric Ipsum
Jan 4 '16 at 16:19
thanks for your wise suggestion. But is this possible to use like this : H/15 * * * * %Server=qa1 H/30 * * * * %Server=qa2 I want to give two schedule in different server.
– Eric Ipsum
Jan 4 '16 at 16:19
or use any if else condition like execute at morning in qa1 server and in others time execute in qa2 server
– Eric Ipsum
Jan 4 '16 at 16:23
or use any if else condition like execute at morning in qa1 server and in others time execute in qa2 server
– Eric Ipsum
Jan 4 '16 at 16:23
Maybe you can try to mix my solution with this plugin: wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin. It allows to manage the node name with a parameter.
– Bruno Lavit
Jan 4 '16 at 16:28
Maybe you can try to mix my solution with this plugin: wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin. It allows to manage the node name with a parameter.
– Bruno Lavit
Jan 4 '16 at 16:28
add a comment |
Without plugins, you can try cloning the job, and creating a build schedule with different parameter values. I.e. you might have job_morning
and job_evening
.
See How do I clone a job in jenkins?
add a comment |
Without plugins, you can try cloning the job, and creating a build schedule with different parameter values. I.e. you might have job_morning
and job_evening
.
See How do I clone a job in jenkins?
add a comment |
Without plugins, you can try cloning the job, and creating a build schedule with different parameter values. I.e. you might have job_morning
and job_evening
.
See How do I clone a job in jenkins?
Without plugins, you can try cloning the job, and creating a build schedule with different parameter values. I.e. you might have job_morning
and job_evening
.
See How do I clone a job in jenkins?
answered Nov 22 '18 at 4:05
congusbonguscongusbongus
7,21644270
7,21644270
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34594703%2fadd-build-parameter-in-jenkins-build-schedule%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown