Skip to content

Commit

Permalink
Fixed JCloudsBuildWrapper behavior with multiple build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
felfert committed May 18, 2017
1 parent cfc531f commit 8a7c350
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,16 @@ public NodePlan apply(InstancesToRun instance) {
MoreExecutors.listeningDecorator(Computer.threadPoolForRemoting), logger, terminateNodes);

final Iterable<RunningNode> runningNodes = provisioner.apply(nodePlans);
final JCloudsCloud waitCloud = waitPhoneHome(runningNodes, listener.getLogger());
if (null != waitCloud) {
waitCloud.phoneHomeWaitAll();
}

return new Environment() {
private JCloudsCloud waitCloud = null;

@Override
public void buildEnvVars(Map<String, String> env) {
List<String> ips = getInstanceIPs(runningNodes, listener.getLogger());
env.put("JCLOUDS_IPS", Util.join(ips, ","));
waitCloud = waitPhoneHome(runningNodes, listener.getLogger());
if (null != waitCloud) {
waitCloud.phoneHomeWaitAll();
}
}

@Override
Expand Down

0 comments on commit 8a7c350

Please sign in to comment.