Closed Sirtea closed 5 years ago
I've also run into this upgrading CI pipelines for docker-app 0.8.0. The GitLab CI job is doing things like --set image.repository=$CI_REGISTRY_IMAGE
to make the project's Docker image repo available to apps, whether they use them or not, since the apps can't pick up environment variables as parameters (#360). This is now an error if the app doesn't have the parameter defined.
This makes it really hard to use a standardized CI job to install apps and pass them optional information from the CI environment that they might need.
Hi @Sirtea and @kinghuang,
Thanks for bringing attention to this! I definitely think that it's a valid use case and we should handle it. Do you think that we should warn users about ignored parameters like docker build
does?
I'd also like to know how you're storing your common configurations? Are you using a git repo?
According to my use case, the warnings would be a lot for each deploy, so it would be quite messy; I still think that the warnings are useful so, if a user makes a typo in the var name it will notice. Thinking openly, there should be warnings, but I would appreciate being able to silence them either by parameter or simply with stderr redirection.
By the way, my usage is to store all dockerapp's related by service in a single repository (one by project or group of microservices). This project is used as a way to avoid variable repetition (DRY principle), as an easy way to deploy new environments, and as a way to split private information that shouldn't be in the repository (credentials and so on); the env-specific parameters file is not in the git repository.
Thinking openly, there should be warnings, but I would appreciate being able to silence them either by parameter or simply with stderr redirection.
This is exactly what we were thinking :)
Description
I'm used to split a large list of services in several dockerapp files for maintainability. As some of data is used by several stacks (split, but a single big stack after all...) my approach was to have "the only one parameters file (tm)". This worked on version 0.6. In the new version 0.8 this no longer works.
Steps to reproduce the issue:
Describe the results you received:
Render fails because excess of variables in the parameters file, that is shared by other dockerapp files. The "one docker-app = one parameters" approach is not useful; extracting the common part to a third file is unmaintainable as there are 17 dockerapp files and the common part depends on every subset of dockerapps, so the list of "common" parameters files gets quickly big.
Describe the results you expected:
Render whatever can be rendered and ignore the extra parameters.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker-app version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Physical desktop linux machine with GUI and Docker. Problem relates to rendering and docker is not used at all on the example.