summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 12:08:32 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 12:08:32 +0000
commitc158fa8d69c704663d289341a014c44c062cda88 (patch)
treed0cac82a9ac9e9ad28bb0030266eb8d5dc91fbbc /lib
parentb806264d29b8d52ccb78a41dcc3d67f2b040700c (diff)
downloadgitlab-ce-c158fa8d69c704663d289341a014c44c062cda88.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/config/entry/job.rb7
-rw-r--r--lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml4
-rw-r--r--lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml5
-rw-r--r--lib/gitlab/diff/file_collection/merge_request_diff_base.rb2
-rw-r--r--lib/gitlab/git/commit.rb2
5 files changed, 14 insertions, 6 deletions
diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb
index 1b9daa2dbc7..967db0c628c 100644
--- a/lib/gitlab/ci/config/entry/job.rb
+++ b/lib/gitlab/ci/config/entry/job.rb
@@ -55,11 +55,12 @@ module Gitlab
validates :start_in, duration: { limit: '1 week' }, if: :delayed?
validates :start_in, absence: true, if: -> { has_rules? || !delayed? }
- validate do
+ validate on: :composed do
next unless dependencies.present?
- next unless needs.present?
+ next unless needs_value.present?
+
+ missing_needs = dependencies - needs_value[:job].pluck(:name) # rubocop:disable CodeReuse/ActiveRecord (Array#pluck)
- missing_needs = dependencies - needs
if missing_needs.any?
errors.add(:dependencies, "the #{missing_needs.join(", ")} should be part of needs")
end
diff --git a/lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml b/lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml
index 16a950ddda1..e5dbc672825 100644
--- a/lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml
@@ -14,3 +14,7 @@ apply:
only:
refs:
- master
+ artifacts:
+ when: on_failure
+ paths:
+ - tiller.log
diff --git a/lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml b/lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml
index 23c65a0cb67..94b9d94fd39 100644
--- a/lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml
@@ -10,10 +10,13 @@ stages:
- deploy
- dast
+variables:
+ DAST_VERSION: 1
+
dast:
stage: dast
image:
- name: "registry.gitlab.com/gitlab-org/security-products/dast:$CI_SERVER_VERSION_MAJOR-$CI_SERVER_VERSION_MINOR-stable"
+ name: "registry.gitlab.com/gitlab-org/security-products/dast:$DAST_VERSION"
variables:
# URL to scan:
# DAST_WEBSITE: https://example.com/
diff --git a/lib/gitlab/diff/file_collection/merge_request_diff_base.rb b/lib/gitlab/diff/file_collection/merge_request_diff_base.rb
index 06cf3d4d168..d27da186de0 100644
--- a/lib/gitlab/diff/file_collection/merge_request_diff_base.rb
+++ b/lib/gitlab/diff/file_collection/merge_request_diff_base.rb
@@ -47,7 +47,7 @@ module Gitlab
private
def cache
- @cache ||= if Feature.enabled?(:hset_redis_diff_caching, project)
+ @cache ||= if Feature.enabled?(:hset_redis_diff_caching, project, default_enabled: true)
Gitlab::Diff::HighlightCache.new(self)
else
Gitlab::Diff::DeprecatedHighlightCache.new(self)
diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb
index c6f762c3ee6..48da838366f 100644
--- a/lib/gitlab/git/commit.rb
+++ b/lib/gitlab/git/commit.rb
@@ -254,7 +254,7 @@ module Gitlab
end
def no_commit_message
- "--no commit message"
+ "No commit message"
end
def to_hash