-
Bug
-
Resolution: Won't Do
-
Major
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.
- is duplicated by
-
JENKINS-28485 Workflow plugin does not pick up environment injector variables
-
- Resolved
-
- is related to
-
JENKINS-42876 EnvInject: Document the current state of Pipeline support
-
- Resolved
-
- links to
Closing as "Won't Do" since EnvInject partially supports Pipeline. The supported use-cases have been documented in
+ there are some incoming improvements (JENKINS-42614)JENKINS-42876