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
10 files
+ 281
58
Compare changes
  • Side-by-side
  • Inline
Files
10
+ 11
9
@@ -13,11 +13,10 @@ class Build < CommitStatus
include IgnorableColumn
include Gitlab::Utils::StrongMemoize
include Deployable
include HasRef
BuildArchivedError = Class.new(StandardError)
ignore_column :commands
ignore_column :commands, :ref, :tag
belongs_to :project, inverse_of: :builds
belongs_to :runner
@@ -46,6 +45,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?, :merge_request, :ref, :tag, :tag?, :branch?, :ref_path, to: :pipeline
##
# Since Gitlab 11.5, deployments records started being created right after
@@ -441,11 +441,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
##
@@ -645,11 +647,11 @@ def user_variables
def secret_group_variables
return [] unless project.group
project.group.ci_variables_for(git_ref, project)
project.group.ci_variables_for(ref_path, project)
end
def secret_project_variables(environment: persisted_environment)
project.ci_variables_for(ref: git_ref, environment: environment)
project.ci_variables_for(ref: ref_path, environment: environment)
end
def steps
Loading