Rob Langley commented on Bug JENKINS-24467

Having spent a little more time looking at this, the above will cause JENKINS-22009 to reoccur, I think a better solution would be the following:

diff --git a/src/main/java/hudson/plugins/git/util/GitUtils.java b/src/main/java/hudson/plugins/git/util/GitUtils.java
index 3d41ad3..d770209 100644
--- a/src/main/java/hudson/plugins/git/util/GitUtils.java
+++ b/src/main/java/hudson/plugins/git/util/GitUtils.java
@@ -266,8 +266,8 @@ public class GitUtils implements Serializable {
         if (buildActions != null) {
             for (Action action : buildActions) {
                 // most importantly, ParametersAction will be processed here (for parameterized builds)
-                if (action instanceof EnvironmentContributingAction) {
-                    EnvironmentContributingAction envAction = (EnvironmentContributingAction) action;
+                if (action instanceof ParametersAction) {
+                    ParametersAction envAction = (ParametersAction) action;
                     envAction.buildEnvVars(b, env);
                 }
             }

EnvironmentContributingAction is too wider net where are I believe ParametersAction will be much better. At least with my testing it looks to do the right thing with or without EnvInject installe. @danielbeck - it should only add parameters rather then environment variables which should avoid any instance of copying of node specific environments. It also passes the test case added for JENKINS-22009.

As for a test case, I'm not sure. EnvInject hit this as EnvInjectPluginAction implements EnvironmentContributingAction, is it possible to set something in a test to create some thing similar?

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