diff --git a/extensions/container-image/container-image-buildpack/deployment/src/main/java/io/quarkus/container/image/buildpack/deployment/BuildpackProcessor.java b/extensions/container-image/container-image-buildpack/deployment/src/main/java/io/quarkus/container/image/buildpack/deployment/BuildpackProcessor.java index f0e24b30c32a4..5b94ca657eecf 100644 --- a/extensions/container-image/container-image-buildpack/deployment/src/main/java/io/quarkus/container/image/buildpack/deployment/BuildpackProcessor.java +++ b/extensions/container-image/container-image-buildpack/deployment/src/main/java/io/quarkus/container/image/buildpack/deployment/BuildpackProcessor.java @@ -187,25 +187,22 @@ private String runBuildpackBuild(BuildpackConfig buildpackConfig, }).build(); log.info("Buildpack build complete"); - if (containerImageConfig.isPushExplicitlyEnabled() || pushRequest.isPresent()) { if (!containerImageConfig.registry.isPresent()) { log.info("No container image registry was set, so 'docker.io' will be used"); } - Optional r = containerImageConfig.registry; - Optional g = containerImageConfig.group; - Optional n = containerImageConfig.name; - AuthConfig authConfig = new AuthConfig(); authConfig.withRegistryAddress(containerImageConfig.registry.orElse("docker.io")); containerImageConfig.username.ifPresent(u -> authConfig.withUsername(u)); containerImageConfig.password.ifPresent(p -> authConfig.withPassword(p)); + log.info("Pushing image to " + authConfig.getRegistryAddress()); Stream.concat(Stream.of(containerImage.getImage()), containerImage.getAdditionalImageTags().stream()).forEach(i -> { ResultCallback.Adapter adapter = new ResultCallback.Adapter<>(); buildpack.getDockerClient().pushImageCmd(i).exec(adapter); try { adapter.awaitCompletion(); + log.info("Push complete"); } catch (InterruptedException e) { throw new IllegalStateException(e); }