summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-06-05 08:40:19 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-06-05 08:40:19 +0000
commit765917dc088bee52a3f95d76fc7f32d408a2af20 (patch)
tree79bf4ea898089de3180768c00a419df529ff0c84 /app
parent8c76c051cfb20d8984823f1ff7d5f49e61d72473 (diff)
parentdbd6223211ec5046535544ea3fe0b8986f51a7e1 (diff)
downloadgitlab-ce-765917dc088bee52a3f95d76fc7f32d408a2af20.tar.gz
Merge branch 'revert-git-depth-for-merge-request' into 'master'
Revert a default GIT_DEPTH for MR pipeline See merge request gitlab-org/gitlab-ce!28926
Diffstat (limited to 'app')
-rw-r--r--app/presenters/ci/build_runner_presenter.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/presenters/ci/build_runner_presenter.rb b/app/presenters/ci/build_runner_presenter.rb
index ed3daf6585b..6d46e0bf18a 100644
--- a/app/presenters/ci/build_runner_presenter.rb
+++ b/app/presenters/ci/build_runner_presenter.rb
@@ -4,7 +4,6 @@ module Ci
class BuildRunnerPresenter < SimpleDelegator
include Gitlab::Utils::StrongMemoize
- DEFAULT_GIT_DEPTH_MERGE_REQUEST = 10
RUNNER_REMOTE_TAG_PREFIX = 'refs/tags/'.freeze
RUNNER_REMOTE_BRANCH_PREFIX = 'refs/remotes/origin/'.freeze
@@ -28,7 +27,6 @@ module Ci
def git_depth
strong_memoize(:git_depth) do
git_depth = variables&.find { |variable| variable[:key] == 'GIT_DEPTH' }&.dig(:value)
- git_depth ||= DEFAULT_GIT_DEPTH_MERGE_REQUEST if merge_request_ref?
git_depth.to_i
end
end
@@ -39,12 +37,13 @@ module Ci
if git_depth > 0
specs << refspec_for_branch(ref) if branch? || legacy_detached_merge_request_pipeline?
specs << refspec_for_tag(ref) if tag?
- specs << refspec_for_merge_request_ref if merge_request_ref?
else
specs << refspec_for_branch
specs << refspec_for_tag
end
+ specs << refspec_for_merge_request_ref if merge_request_ref?
+
specs
end