-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-ecr/build_and_push_image
command: Docker build fails but step succeeds
#372
Comments
Does this happend with any image or one specific? |
We're using # syntax=docker/dockerfile:1
FROM node:20.18-bullseye-slim AS base
# Left this in to avoid having to edit the job config
FROM base AS prod
RUN exit 1 |
It also happens when using |
What executor are you using? |
We're using a Docker executor: defaults: &defaults
resource_class: large
working_directory: ~/workspace
shell: /bin/bash --login
docker:
- image: cimg/node:20.17 |
Your problem is the shell, is there any reason you are setting that? |
Aha that did it! I'm not sure why we had that but it's a very old line. Thank you very much! |
Orb version
9.3.7
What happened
Execution of a build job whose final step is the
aws-ecr/build_and_push_image
command succeeded, even when the Docker build failed (with exit code 6).The job configuration:
Command step log
Expected behavior
The command step should fail because the Docker build failed.
Additional information
I also tried adding a forced failure to the Dockerfile:
RUN exit 1
, which reproduces this situation. Docker reports an exit code of 1, but the command step still succeeds.so something about the command seems to be swallowing the exit code.
The text was updated successfully, but these errors were encountered: