Docker build failed but job suceed
Issue: Docker build failed but the pipeline job succeed
Steps to reproduce:
- I have bash script to build docker images (auth to registry, pull old image for cache, build and push), the build is done using the following code ($1 is replaced with name of the application):
docker build --cache-from "$REPOSITORY_URL":latest -t "$REPOSITORY_URL"/"$1":"${CI_COMMIT_SHA:0:12}" -t "$REPOSITORY_URL"/"$1":latest -f docker/"$1".dockerfile .
- Inside the container is being done some gradle build
Actual behaviour
- Docker build failed with message: BUILD FAILED in 55s
- Job / Pipeline completed successfully
Expected behaviour
- Docker build failed
- Job / Pipeline failed
Environment description:
- Using a self-hosted runner based on Ubuntu (checking exact version)
- Runner executor is shell
- Runner version 13.3.1
Aditional Info
- Full logs https://pastebin.com/ZNVmBH76
Edited by Filip Niko