Branch: refs/heads/JENKINS-66171/fix-capturing-built-image-id-again
  Home:   https://github.com/jenkinsci/docker-custom-build-environment-plugin
  Commit: fac2e9cff017bfd2d1d4a902d28daea645bb84fc
      
https://github.com/jenkinsci/docker-custom-build-environment-plugin/commit/fac2e9cff017bfd2d1d4a902d28daea645bb84fc
  Author: Jon Hermansen <j...@jh86.org>
  Date:   2023-03-22 (Wed, 22 Mar 2023)

  Changed paths:
    M src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java

  Log Message:
  -----------
  JENKINS-66171: Get built docker image ID using --iidfile

Previously we were capturing `docker build` output, which led to some problems:
1. Other programs could print similar strings, which would match but did not
contain the image ID. This was fixed by taking the last capture as image ID.
2. `docker build` output has changed in version 23, so now we'd have to match
the output twice. First pass for docker < 23, and another for >= 23

Docker has had the `--iidfile` option for some time now, so switch to using it.
It is a much less fragile way to capture the image ID.

Tested with Docker 20.10.23 and 23.0.1


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/docker-custom-build-environment-plugin/push/refs/heads/JENKINS-66171/fix-capturing-built-image-id-again/000000-fac2e9%40github.com.

Reply via email to