You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both in GitLab CI and Bitbucket Pipelines the shell-style && concatenation seems to be very fragile and doesn't behave as expected.
Expected behavior
When a single command fails in the chain of commands concatenated with && then the entire pipeline should fail, and abort immediately.
Actual behavior
When a single command fails in a block with pushd ... && kustomize edit ... && popd ... then the pipeline continues with the next step, which consequently fails again, but even there without making the entire pipeline fail.
Looks innocent, doesn't it? – If the image doesn't exist yet it would error out, hence we fall back to true.
So, what's the problem? – What if we don't have permissions to push, pull, etc.? docker login worked on the line above, but this line should fail now. And it won't. It will continue to the next statements and produce potentially confusing errors that need to be troubleshot. There must be a better way.™️
Both in GitLab CI and Bitbucket Pipelines the shell-style
&&
concatenation seems to be very fragile and doesn't behave as expected.Expected behavior
When a single command fails in the chain of commands concatenated with
&&
then the entire pipeline should fail, and abort immediately.Actual behavior
When a single command fails in a block with
pushd ... && kustomize edit ... && popd ...
then the pipeline continues with the next step, which consequently fails again, but even there without making the entire pipeline fail.Examples (related failing builds)
The text was updated successfully, but these errors were encountered: