mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
[FIXED JENKINS-7442] Fix expansion of EnvVars in ant properties.
Ant build step had quite a mix: buildFile and antOpts expanded against env, properties against buildVariables, and targets against both. Now merging buildVariables into env and applying to all.
This commit is contained in:
1 parent
8e6779f78b
commit
5f1fef602c
3 files changed
+20
-8
No files matched your search
@@ -141,6 +141,7 @@ public class Ant extends Builder {
|
||||
ArgumentListBuilder args = new ArgumentListBuilder();
|
||||
|
||||
EnvVars env = build.getEnvironment(listener);
|
||||
env.overrideAll(build.getBuildVariables());
|
||||
|
||||
AntInstallation ai = getAnt();
|
||||
if(ai==null) {
|
||||
@@ -156,10 +157,9 @@ public class Ant extends Builder {
|
||||
args.add(exe);
|
||||
}
|
||||
|
||||
VariableResolver<String> vr = build.getBuildVariableResolver();
|
||||
|
||||
VariableResolver<String> vr = new VariableResolver.ByMap<String>(env);
|
||||
String buildFile = env.expand(this.buildFile);
|
||||
String targets = Util.replaceMacro(env.expand(this.targets), vr);
|
||||
String targets = env.expand(this.targets);
|
||||
|
||||
FilePath buildFilePath = buildFilePath(build.getModuleRoot(), buildFile, targets);
|
||||
|
||||
|
||||
Reference in new issue
Block a user