Don't push before test is complete #3140
Replies: 2 comments
-
How do we only run the tests on MR's, and only push if we are on main? We really need the ability to split up the tests from the push. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I removed the "release" from the "matrix" and the "output" and the "target" from the bake file. Instead I define it in CI test:
- docker buildx bake --set=*.target=test --set=*.output=type=cacheonly --builder=remote --progress=quiet
release:
- docker buildx bake --set=*.target=release --set=*.output=type=registry --builder=remote --progress=quiet But how do we ensure that the cache from the "test" is used in release? Probably have to look into "cache-from" and "cache-to" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question: How do we ensure that the test runs first, and passes successfully, before we push to the image registry?
And the Golang Dockerfile
So we have a "test" stage, where we check that everything is working as intended in the image.
I was inspired to do this because of this Article: https://docs.docker.com/guides/bake/#testing-and-linting
Beta Was this translation helpful? Give feedback.
All reactions