diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-04-25 15:23:39 +0700 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-04-29 18:52:51 +0700 |
commit | ed3a2fc8d7fef157706859dd009e1662fdc3d4b5 (patch) | |
tree | 6468ddc17f339ce41b7c00648020b75a615f9bef /app/models/ci/build.rb | |
parent | ddee4426c4bd3df8bde7936a6ffb0a1973a4d5a1 (diff) | |
download | gitlab-ce-ed3a2fc8d7fef157706859dd009e1662fdc3d4b5.tar.gz |
Fix CI_COMMIT_REF_NAME and SLUG variable
With Pipelines for Merge Requests feature, users cannout keep using
$CI_COMMIT_REF_NAME and _SLUG predefined variables for dynamic
environments. We fix this problem by explicitly looking at the source
ref.
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r-- | app/models/ci/build.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index e5236051118..5a2ead41578 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -6,6 +6,7 @@ module Ci include Ci::Processable include Ci::Metadatable include Ci::Contextable + include Ci::PipelineDelegator include TokenAuthenticatable include AfterCommitQueue include ObjectStorage::BackgroundMove @@ -49,8 +50,6 @@ module Ci delegate :terminal_specification, to: :runner_session, allow_nil: true delegate :gitlab_deploy_token, to: :project delegate :trigger_short_token, to: :trigger_request, allow_nil: true - delegate :merge_request_event?, :merge_request_ref?, - :legacy_detached_merge_request_pipeline?, to: :pipeline ## # Since Gitlab 11.5, deployments records started being created right after |