mirror of
https://github.com/authelia/authelia.git
synced 2026-10-28 17:44:56 +08:00
Every agent shares one Docker daemon, and the coverage build used the same `authelia:dist` tag that every suite's `pre-command` loads, retags and removes. When another build's suites loaded their image between this build's `docker build` and the `docker save` in `pre-artifact`, the tag was gone (`reference does not exist`) or pointed at the other build's image. Since `pre-artifact` had no `pipefail`, the failed save uploaded an empty archive, the job passed and every suite in the build failed on load. The coverage image is now built under a per-job tag through a new `--tag` flag on `authelia-scripts docker build`. `pre-artifact` takes `authelia:dist` only to save the archive, inside the same lock the suites hold around their load, and `pre-exit` removes the per-job tag. With every write to `authelia:dist` under that lock, suites can no longer pick up another build's image between their load and retag either. `pre-artifact` now fails the job when the save fails, and skips the save when the build itself failed or was cancelled. Signed-off-by: Amir Zarrinkafsh <3339418+nightah@users.noreply.github.com>