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
In the test stage of the Dockerfile, I want to run sanity checks on the image produced in the release stage before publishing the image to the registry.
However, if I run build bake test release --push, the image is built and pushed before the test target has a chance to run because there's a logical dependency between the stages in the Dockerfile which prevents the test target to run before the image is produced and the push happens in parallel.
So what's the proper way to get the targets sequentially in this case? Is that a bug if the push happens before all the targets have finished their execution?
I suppose I can just run build bake test && build bake release --push to force my targets to be run sequentially. But since we can define some group in the bake file to run targets in parallel (which is equivalent to specifying many targets on the command line), i tend to think build bake is missing an equivalent to run targets sequentially, e.g.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm currently trying to rewrite my old CI workflow using
build bake
and I think I missed something.Consider this dockerfile and this bake file:
In the
test
stage of theDockerfile
, I want to run sanity checks on the image produced in therelease
stage before publishing the image to the registry.However, if I run
build bake test release --push
, the image is built and pushed before thetest
target has a chance to run because there's a logical dependency between the stages in theDockerfile
which prevents thetest
target to run before the image is produced and the push happens in parallel.So what's the proper way to get the targets sequentially in this case? Is that a bug if the push happens before all the targets have finished their execution?
I suppose I can just run
build bake test && build bake release --push
to force my targets to be run sequentially. But since we can define somegroup
in the bake file to run targets in parallel (which is equivalent to specifying many targets on the command line), i tend to thinkbuild bake
is missing an equivalent to run targets sequentially, e.g.What's your opinion about that?
Beta Was this translation helpful? Give feedback.
All reactions