diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-16 23:47:35 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-20 20:18:41 +0300 |
commit | 0903456a0704bd5c4e594c423f0325b29cd99013 (patch) | |
tree | 291e585e1afdbb6857c6d4a49d71a124c4a4e82c /spec/factories/deploy_tokens.rb | |
parent | 3c3cab8b329ce83ae7d1c669a6933dcb16fcd552 (diff) |
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 'spec/factories/deploy_tokens.rb')
-rw-r--r-- | spec/factories/deploy_tokens.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/factories/deploy_tokens.rb b/spec/factories/deploy_tokens.rb index 5fea4a9d5a6..52ec588973a 100644 --- a/spec/factories/deploy_tokens.rb +++ b/spec/factories/deploy_tokens.rb @@ -10,5 +10,13 @@ FactoryBot.define do trait :revoked do revoked true end + + trait :gitlab_deploy_token do + name DeployToken::GITLAB_DEPLOY_TOKEN + end + + trait :expired do + expires_at { Date.today - 1.month } + end end end |