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
8 files
+ 245
33
Compare changes
  • Side-by-side
  • Inline
Files
8
+ 6
0
@@ -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
@@ -652,6 +653,11 @@ def secret_project_variables(environment: persisted_environment)
project.ci_variables_for(ref: git_ref, environment: environment)
end
def git_depth
yaml_variables&.find { |variable| variable[:key] == 'GIT_DEPTH' }
&.dig(:value).to_i
end
def steps
[Gitlab::Ci::Build::Step.from_commands(self),
Gitlab::Ci::Build::Step.from_after_script(self)].compact
Loading