You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[JENKINS-34146] Disabled parametrized jobs could be build from build URL #17013
If you use the build URL you could launch disabled parametrized jobs
1 - Create a Job (any type)
2 - add a parameter
3 - copy build URL
4 - disable the job
5 - paste the URL on browser and go to it
6 - the build asks for parameters and could be launch
7 - the build is keep on queue forever
If you use the build URL you could launch disabled parametrized jobs
1 - Create a Job (any type)
2 - add a parameter
3 - copy build URL
4 - disable the job
5 - paste the URL on browser and go to it
6 - the build asks for parameters and could be launch
7 - the build is keep on queue forever
Cannot reproduce on 1.642.2. While the page "This build requires parameters" appears, submitting the form does not result in a queue item.
Apr 12, 2016 4:31:16 PM hudson.model.Executor finish1
SEVERE: Executor threw an exception
java.lang.Error: The null Executable has been created for hudson.model.queue.WorkUnit@35711043[work=jobname]. The task cannot be executed
at hudson.model.Executor.run(Executor.java:397)
This could probably be improved, but Jenkins does not expose the reported problem (anymore).
Please make sure issues you report actually occur in current versions of Jenkins.
Cannot reproduce on 1.642.2. While the page "This build requires parameters" appears, submitting the form does not result in a queue item.
Apr 12, 2016 4:31:16 PM hudson.model.Executor finish1
SEVERE: Executor threw an exception
java.lang.Error: The null Executable has been created for hudson.model.queue.WorkUnit@35711043[work=jobname]. The task cannot be executed
at hudson.model.Executor.run(Executor.java:397)
This could probably be improved, but Jenkins does not expose the reported problem (anymore).
Please make sure issues you report actually occur in current versions of Jenkins.
in ParameterizedJobMixIn ask for parameters before to check if it is asJob().isBuildable()
publicfinal void doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException {
if (delay == null) {
delay = new TimeDuration(asJob().getQuietPeriod());
}
// if a build is parameterized, let that take over
ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class);
if (pp != null && !req.getMethod().equals("POST")) {
// show the parameter entry form.
req.getView(pp, "index.jelly").forward(req, rsp);
return;
}
hudson.model.BuildAuthorizationToken.checkPermission(asJob(), asJob().getAuthToken(), req, rsp);
if (pp != null) {
pp._doBuild(req, rsp, delay);
return;
}
if (!asJob().isBuildable()) {
throw HttpResponses.error(SC_INTERNAL_SERVER_ERROR, new IOException(asJob().getFullName() + " is not buildable"));
}
<span class="code-keyword">if</span> (!asJob().isBuildable()) {
<span class="code-keyword">throw</span> HttpResponses.error(SC_INTERNAL_SERVER_ERROR, <span class="code-keyword">new</span> IOException(asJob().getFullName() + <span class="code-quote">" is not buildable"</span>));
}
<span class="code-comment">// <span class="code-keyword">if</span> a build is parameterized, let that take over
ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class); if (pp != null && !req.getMethod().equals("POST")) { // show the parameter entry form. req.getView(pp, "index.jelly").forward(req, rsp); return;
}
I could reproduce it on 1.642.3.2
in ParameterizedJobMixIn ask for parameters before to check if it is asJob().isBuildable()
publicfinal void doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException {
if (delay == null) {
delay = new TimeDuration(asJob().getQuietPeriod());
}
// if a build is parameterized, let that take over
ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class);
if (pp != null && !req.getMethod().equals("POST")) {
// show the parameter entry form.
req.getView(pp, "index.jelly").forward(req, rsp);
return;
}
hudson.model.BuildAuthorizationToken.checkPermission(asJob(), asJob().getAuthToken(), req, rsp);
if (pp != null) {
pp._doBuild(req, rsp, delay);
return;
}
if (!asJob().isBuildable()) {
throw HttpResponses.error(SC_INTERNAL_SERVER_ERROR, new IOException(asJob().getFullName() + " is not buildable"));
}
This order solve de problem.
publicfinal void doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException {
if (delay == null) {
delay = new TimeDuration(asJob().getQuietPeriod());
}
if (!asJob().isBuildable()) {
throw HttpResponses.error(SC_INTERNAL_SERVER_ERROR, new IOException(asJob().getFullName() + " is not buildable"));
}
// if a build is parameterized, let that take over
ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class);
if (pp != null && !req.getMethod().equals("POST")) {
// show the parameter entry form.
req.getView(pp, "index.jelly").forward(req, rsp);
return;
}
Activity
jenkins-infra-bot commentedon Apr 11, 2016
Remote link associated with this issue:
jenkins-infra-bot commentedon Apr 12, 2016
Raw content of original comment:
Cannot reproduce on 1.642.2. While the page "This build requires parameters" appears, submitting the form does not result in a queue item.
This could probably be improved, but Jenkins does not expose the reported problem (anymore).
Please make sure issues you report actually occur in current versions of Jenkins.
jenkins-infra-bot commentedon Apr 13, 2016
Raw content of original comment:
I could reproduce it on 1.642.3.2
in ParameterizedJobMixIn ask for parameters before to check if it is asJob().isBuildable()
This order solve de problem.
jenkins-infra-bot commentedon Apr 13, 2016
Raw content of original comment:
I made a pull request with the change #2262
jenkins-infra-bot commentedon Apr 22, 2016
Raw content of original comment:
Code changed in jenkins
User: Ivan Fernandez Calvo
Path:
core/src/main/java/jenkins/model/ParameterizedJobMixIn.java
http://jenkins-ci.org/commit/jenkins/37e7856b017fcf700d314086a709f00601edef00
Log:
JENKINS-34146check if build is build able before to ask for parametersjenkins-infra-bot commentedon Apr 22, 2016
Raw content of original comment:
Code changed in jenkins
User: Daniel Beck
Path:
core/src/main/java/jenkins/model/ParameterizedJobMixIn.java
http://jenkins-ci.org/commit/jenkins/f6e431b80c4d162560419fa51633224a9724bb0d
Log:
Merge pull request #2262 from kuisathaverat/
JENKINS-34146[FIX JENKINS-34146] check if build is build able before to ask for parameters
Compare: ce9de5a...f6e431b