Get the variables from gitlab project variables
Is your feature request related to a problem? Please describe. I would like an option for this tool to automatically get and use variables from the gitlab server project and/or group level variables. I am first interested by project level variables: https://docs.gitlab.com/ee/api/project_level_variables.html
Describe the solution you'd like
I would like a CLI option like --project-id my_id and/or a project-id setting in one of the dot files, so that I can commit this file safely, and automatically get the variables filled from a call to gitlab API, whose URL can be guessed from the git remote and the project ID.
Describe alternatives you've considered
I have to manually create a file in my repo at first use or use --variable every time which is cumbersome
I'm most likely not going to work on this. We only use project CI/CD variables for holding secrets, that we do not want our developers to get their hands on.
I see the purpose of this feature though.
@ecourreges-orange Keep it open, thats ok. Maybe some other contributor will implement it.
It would be useful to support multiple environments. We, for example, use 3 environments in a Gitlab-CI/CD project:
productionenvironmentstagingenvironmentdevelopmentenvironment
This allows us to use variable references for variables which are the same for all 3 environments.
The number of CI/CD-variables is reduced drastically by that approach.
Pulling the variables of the development environment to laptops of developers would simplify things a lot and keep the variables in sync between Gitlab and local development.
@renne In our case we moved the secrets out of Gitlab into sops files https://github.com/getsops/sops that live in the repo. Every dev has access to the dev sops file while some only to the prod one. We use this command specifically to pass decrypted env vars along to other processes.