-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[BUG] undefined build secret
at docker compose convert
#9963
Comments
Hello @dee-kryvenko It seems you found a bug but not the one you expected 😬
Looking at the implementation in So to be clear, you should have the same error when using By the way, you can define a default secret in your main compose file that you could override with your cc @ndeloof @ulyssessouza did you remember why |
I am not sure I'm with you on this one in a sense that the |
The default behavior of |
Sounds amazing. Thanks! |
Description
When a service refer to a secret in the
build
section that doesn't exist anywhere yet - thedocker compose convert
fails withservice "test" refers to undefined build secret my-ci-secret: invalid compose project
. I am not sure if this is as designed, but I hope not. It does not fails like that with the runtime secrets.The use case is simple - you would want to use
docker compose convert
in CI to merge multiple compose files and convert non-yaml compose files to yaml, to produce an effective single compose yaml. That you can then read and process, such as - inject secrets that were asked for. For instance, mydocker-compose.yaml
could be something likeAnd my
docker-compose.local.yaml
could beThen my pipeline would not use that
docker-compose.local.yaml
, it would only usedocker-compose.yaml
and possibly other withdocker compose convert
. Resultingdocker-compose.auto.yaml
the pipeline can read, understand that there are secrets expected to be injected and produce andocker-compose.override.yaml
That override obviously may be adding more stuff such as cache locations etc etc. So it needs the results of
docker compose convert
because it needs to know what's in it and what it is about to produce.If I remove the
secrets
underbuild
- it works exactly like I am expecting, but it fails with thebuild
secrets which to me sounds wrong and breaking this perfectly valid CI scenario.Steps To Reproduce
See description
Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: