Browse Source

log packer image creation duration

tags/v0.12.2
Jonathan Cobb 4 years ago
parent
commit
596f43d728
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      bubble-server/src/main/java/bubble/service/packer/PackerJob.java

+ 3
- 1
bubble-server/src/main/java/bubble/service/packer/PackerJob.java View File

@@ -47,6 +47,7 @@ import static org.cobbzilla.util.network.NetworkUtil.getExternalIp;
import static org.cobbzilla.util.string.StringUtil.truncate;
import static org.cobbzilla.util.system.CommandShell.hostname;
import static org.cobbzilla.util.time.TimeUtil.DATE_FORMAT_YYYYMMDDHHMMSS;
import static org.cobbzilla.util.time.TimeUtil.formatDuration;

@Slf4j
public class PackerJob implements Callable<List<PackerImage>> {
@@ -223,6 +224,7 @@ public class PackerJob implements Callable<List<PackerImage>> {
toFileOrDie(abs(tempDir) + "/packer.json", packerJson);

// run packer, return handle to running packer
final long start = now();
log.info("running packer for " + installType + "...");
final int packerParallelBuilds = computeDriver.getPackerParallelBuilds();
final CommandResult commandResult = CommandShell.exec(new Command(new CommandLine(PACKER_BINARY)
@@ -256,7 +258,7 @@ public class PackerJob implements Callable<List<PackerImage>> {
}

if (imagesRef != null) imagesRef.set(images);
log.info("packer images created: "+images);
log.info("packer images created in "+formatDuration(now() - start)+": "+images);
return images;
}



Loading…
Cancel
Save