summaryrefslogtreecommitdiff
path: root/app/models/deploy_token.rb
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-04-16 15:47:35 -0500
committerMayra Cabrera <mcabrera@gitlab.com>2018-04-20 12:18:41 -0500
commit0903456a0704bd5c4e594c423f0325b29cd99013 (patch)
tree291e585e1afdbb6857c6d4a49d71a124c4a4e82c /app/models/deploy_token.rb
parent3c3cab8b329ce83ae7d1c669a6933dcb16fcd552 (diff)
downloadgitlab-ce-0903456a0704bd5c4e594c423f0325b29cd99013.tar.gz
Expose deploy token to CI/CD jobs as environment variable
- If a deploy token with a name 'gitlab-deploy-token' is exists for the project, CI_DEPLOY_USER and CI_DEPLOY_PASSWORD variables will be expose
Diffstat (limited to 'app/models/deploy_token.rb')
-rw-r--r--app/models/deploy_token.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/deploy_token.rb b/app/models/deploy_token.rb
index 979e9232fda..191f07c527f 100644
--- a/app/models/deploy_token.rb
+++ b/app/models/deploy_token.rb
@@ -4,6 +4,7 @@ class DeployToken < ActiveRecord::Base
add_authentication_token_field :token
AVAILABLE_SCOPES = %i(read_repository read_registry).freeze
+ GITLAB_DEPLOY_TOKEN = 'gitlab-deploy-token'.freeze
default_value_for(:expires_at) { Forever.date }