Issue Type: Bug Bug
Assignee: Gregory Boissinot
Components: envinject-plugin
Created: 23/Jan/15 1:30 PM
Description:

If you install both EnvInject and the Workflow plugins, then create a workflow job, EnvInjectJobProperty is offered as an option in the configuration screen. It adds nothing of use for workflows, which can already read and write environment variables at arbitrary points, run Groovy logic, and so on, so it is just a source of confusion.

EnvInjectJobProperty.DescriptorImpl.isApplicable returns true unconditionally. It does not in fact make any reference to AbstractProject/AbstractBuild. Yet so far as I can tell, all of the other classes which check for the existence of a configured EnvInjectJobProperty are in fact assuming AbstractProject/AbstractBuild and probably could not work otherwise.

If I am right, then isApplicable should return AbstractProject.class.isAssignableFrom(jobType), and the class declaration should be public class EnvInjectJobProperty extends JobProperty<AbstractProject>. (It is unclear to me why you are currently making this class generic, since it concrete and has no subclasses, meaning it is just an ill-typed synonym of public class EnvInjectJobProperty extends JobProperty<Job>.)

Probably hudson.model.ExternalJob shows the same issue.

Project: Jenkins
Labels: workflow user-experience
Priority: Major Major
Reporter: Jesse Glick
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to