Skip to content
Snippets Groups Projects

Expose refspec and depth to runner

Merged Shinya Maeda requested to merge expose-merge-ref-to-runner into master
All threads resolved!
Compare and
7 files
+ 176
13
Compare changes
  • Side-by-side
  • Inline
Files
7
+ 10
5
@@ -46,6 +46,7 @@ class Build < CommitStatus
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?, to: :pipeline
##
# Since Gitlab 11.5, deployments records started being created right after
@@ -441,11 +442,13 @@ def simple_variables
# All variables, including persisted environment variables.
#
def variables
Gitlab::Ci::Variables::Collection.new
.concat(persisted_variables)
.concat(scoped_variables)
.concat(persisted_environment_variables)
.to_runner_variables
strong_memoize(:variables) do
Gitlab::Ci::Variables::Collection.new
.concat(persisted_variables)
.concat(scoped_variables)
.concat(persisted_environment_variables)
.to_runner_variables
end
end
##
@@ -463,6 +466,8 @@ def features
def merge_request
return @merge_request if defined?(@merge_request)
@merge_request ||= pipeline.merge_request if merge_request?
@merge_request ||=
begin
merge_requests = MergeRequest.includes(:latest_merge_request_diff)
Loading