Backend: CI_DEPLOY_* variables not set if gitlab-deploy-token is defined in group settings
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary As described [here](https://docs.gitlab.com/ee/user/project/deploy_tokens/index.html#gitlab-deploy-token), you could add a special deploy token, which would be exposed as environment variables in a CI job. Doing so in a project works fine, but I need this deploy token to be valid for all projects in this group. So I added a group deploy token with the same name. Unfortunately after this change the CI_DEPLOY_USER and CI_DEPLOY_PASSWORD variables are undefined in the CI job. ### Steps to reproduce - Add a group deploy token with name 'gitlab-deploy-token' - Run a CI pipeline in a project within this group. ### Workaround 1. Created a deploy token in group level named `gitlab-deploy-token` 1. Set group level environment variables `CI_DEPLOY_USER` and `CI_DEPLOY_PASSWORD` to `gitlab-deploy-token` and the value thereof, respectively. ### Proposal 1. Either provide the values automatically 1. or add the workaround in the documentation ### Example Project Example project: https://gitlab.com/justinvtime-test/test Build with the project deploy token defined: https://gitlab.com/justinvtime-test/test/-/jobs/505669965 Build with the group deploy token defined: https://gitlab.com/justinvtime-test/test/-/jobs/505668102 ### What is the current *bug* behavior? the CI_DEPLOY_USER and CI_DEPLOY_PASSWORD variables are undefined in the CI job ### What is the expected *correct* behavior? the CI_DEPLOY_USER and CI_DEPLOY_PASSWORD variables are defined in the CI job
issue