Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1 from greg2001/master
[FIXED JENKINS-27424] Expose the current Jenkins job to the Groovy script as "currentJob" variable
  • Loading branch information
ikedam committed Mar 14, 2015
2 parents 3fbdd41 + f4e702d commit 9b780e3
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -215,7 +215,10 @@ protected Binding createBinding(AbstractProject<?, ?> project, List<Action> acti

LOGGER.fine(String.format("%s: set environments %s", project.getName(), env.toString()));

return new Binding(env);
Binding binding = new Binding();
binding.getVariables().putAll(env);
binding.setVariable("currentJob", project);
return binding;
}

/**
Expand Down

0 comments on commit 9b780e3

Please sign in to comment.