gitlab-ci-local icon indicating copy to clipboard operation
gitlab-ci-local copied to clipboard

Environment specific variables from file paths

Open kouk opened this issue 1 year ago • 6 comments

Is your feature request related to a problem? Please describe.

Currently, while a cross-environment variable can be sourced from a path, e.g. in .gitlab-ci-local-variables.yml the below would allow using the kubernetes CLI in the job:

KUBECONFIG: ~/.kube/config

the same feature cannot be used with environment specific values, e.g.:

---
KUBECONFIG:
   values:
       '*devel*': ~/.kube/config.devel
       '*staging*': ~/.kube/config.staging
       '*production*': ~/.kube/config.production

Adding type: file doesn't fix the issue, since it will just create a file with the path as the contents.

Describe the solution you'd like

Be able to use env specific variables with content from file paths.

Describe alternatives you've considered alternatively one could embed their files as YAML multiline literals.

Additional context

none

kouk avatar Jan 04 '23 20:01 kouk