private Launcher(String[] args) throws JSAPException { JSAP jsap = this.defineArgs(); JSAPResult arguments = jsap.parse(args); LauncherUtils.checkArguments(jsap, arguments, LauncherType.DOCKERPOOL); this.initConfig(arguments); this.initSerializerEngines(); this.initNotifiers(); }
List<InputBuildId> buildIds = this.readListOfBuildIds(); LOGGER.info("Find "+buildIds.size()+" builds to run."); String imageId = DockerHelper.findDockerImage(this.config.getDockerImageName(), this.getDockerClient()); LOGGER.info("Found the following docker image id: "+imageId); this.setDockerOutputDir(this.config.getLogDirectory()); this.setRunId(runId); this.setEngines(this.engines); executorService.submit(this.submitBuild(imageId, inputBuildId)); LOGGER.warn("Timeout launched: the job is running for one day. Force stopped "+ submittedRunnablePipelineContainers.size()+" docker container(s)."); executorService.shutdownNow(); this.setStatusForUnexecutedJobs(); endProcessSerializer.setStatus("timeout"); LOGGER.error("Error while await termination. Force stopped "+ submittedRunnablePipelineContainers.size()+" docker container(s).", e); executorService.shutdownNow(); this.setStatusForUnexecutedJobs(); endProcessSerializer.setStatus("interrupted"); this.getDockerClient().close(); endProcessSerializer.serialize(); if (this.endProcessNotifier != null) {