Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,763
    • Issues 44,763
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,330
    • Merge requests 1,330
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #214014
Closed
Open
Issue created Apr 09, 2020 by JustInVTime@justinvtime

Backend: CI_DEPLOY_* variables not set if gitlab-deploy-token is defined in group settings

Summary

As described here, 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
  2. 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
  2. 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

Edited May 17, 2022 by Mark Nuzzo
Assignee
Assign to
Time tracking