Commit 3ebaa2bd authored by Kamil Trzciński's avatar Kamil Trzciński Committed by Alessio Caiazza

Merge branch '46454-wrong-value-in-ci-deploy-user' into 'master'

Resolve "CI/CD jobs: Wrong value in env. variable CI_DEPLOY_USER using <gitlab-deploy-token> deploy token"

Closes #46454

See merge request gitlab-org/gitlab-ce!19047
parent dc88ced2
......@@ -661,7 +661,7 @@ module Ci do |variables|
break variables unless gitlab_deploy_token
variables.append(key: 'CI_DEPLOY_USER', value:
variables.append(key: 'CI_DEPLOY_USER', value: gitlab_deploy_token.username)
variables.append(key: 'CI_DEPLOY_PASSWORD', value: gitlab_deploy_token.token, public: false)
title: Fixes deploy token variables on Ci::Build
merge_request: 19047
type: fixed
......@@ -76,7 +76,7 @@ pull images from your Container Registry.
> [Introduced][ce-18414] in GitLab 10.8.
There's a special case when it comes to Deploy Tokens, if a user creates one
named `gitlab-deploy-token`, the name and token of the Deploy Token will be
named `gitlab-deploy-token`, the username and token of the Deploy Token will be
automatically exposed to the CI/CD jobs as environment variables: `CI_DEPLOY_USER` and
`CI_DEPLOY_PASSWORD`, respectively.
......@@ -2044,7 +2044,7 @@ describe Ci::Build do
let(:deploy_token_variables) do
{ key: 'CI_DEPLOY_USER', value:, public: true },
{ key: 'CI_DEPLOY_USER', value: deploy_token.username, public: true },
{ key: 'CI_DEPLOY_PASSWORD', value: deploy_token.token, public: false }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment