Commit 3b9238b7 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 395dbfa0 f7e7ee71
......@@ -5,6 +5,7 @@ stages:
- prepare
- quick-test
- test
- review-prepare
- review
- qa
- post-test
......
......@@ -13,7 +13,9 @@
- .default-before_script
- .except-docs
image: dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.6.3-git-2.22-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-18.06.1
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
services:
- docker:19.03.0-dind
variables:
......@@ -42,10 +44,6 @@
- time scripts/build_assets_image
- scripts/clean-old-cached-assets
- rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here
# Play dependent manual jobs
- install_api_client_dependencies_with_apt
- play_job "review-build-cng" || true # this job might not exist so ignore the failure if it cannot be played
- play_job "schedule:review-build-cng" || true # this job might not exist so ignore the failure if it cannot be played
only:
- /.+/@gitlab-org/gitlab-ce
- /.+/@gitlab-org/gitlab-ee
......@@ -186,7 +184,8 @@ jest:
- .default-retry
- .default-cache
- .except-docs
dependencies: ["setup-test-env"]
dependencies: []
stage: test
variables:
SETUP_DB: "false"
before_script:
......
......@@ -165,7 +165,9 @@ downtime_check:
- /^[\d-]+-stable(-ee)?$/
- /(^docs[\/-].+|.+-docs$)/
- /(^qa[\/-].*|.*-qa$)/
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
ee_compat_check:
extends: .rake-exec
......@@ -195,7 +197,9 @@ db:migrate:reset:
- .default-before_script
- .use-pg
- .except-docs-qa
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
script:
- bundle exec rake db:migrate:reset
......@@ -207,7 +211,9 @@ db:check-schema:
- .default-before_script
- .use-pg
- .except-docs-qa
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
script:
- source scripts/schema_changed.sh
......@@ -219,7 +225,9 @@ db:migrate-from-v11.11.0:
- .default-before_script
- .use-pg
- .except-docs-qa
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
variables:
SETUP_DB: "false"
script:
......@@ -248,7 +256,9 @@ db:rollback:
- .default-before_script
- .use-pg
- .except-docs-qa
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
script:
- bundle exec rake db:migrate VERSION=20180101160629
- bundle exec rake db:migrate SKIP_SCHEMA_VERSION_CHECK=true
......@@ -261,7 +271,9 @@ gitlab:setup:
- .default-before_script
- .use-pg
- .except-docs-qa
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
variables:
SETUP_DB: "false"
script:
......
......@@ -53,8 +53,7 @@ build-qa-image:
.review-build-cng-base:
image: ruby:2.6-alpine
stage: test
when: manual
stage: review-prepare
before_script:
- source scripts/utils.sh
- install_api_client_dependencies_with_apk
......@@ -67,17 +66,20 @@ review-build-cng:
extends:
- .review-build-cng-base
- .review-only
needs: ["gitlab:assets:compile pull-cache"]
schedule:review-build-cng:
extends:
- .review-build-cng-base
- .review-schedules-only
needs: ["gitlab:assets:compile"]
review-deploy:
extends: .review-base
allow_failure: true
retry: 1
stage: review
needs: ["review-build-cng"]
variables:
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
......
......@@ -7,7 +7,9 @@ cache gems:
- .default-cache
- .default-before_script
- .except-docs
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
variables:
SETUP_DB: "false"
script:
......
......@@ -83,7 +83,8 @@ module Gitlab
docs: "~Documentation", # Docs are reviewed along DevOps stages, so don't need roulette for now.
none: "",
qa: "~QA",
test: "~test for `spec/features/*`"
test: "~test for `spec/features/*`",
engineering_productivity: "Engineering Productivity for CI config review"
}.freeze
CATEGORIES = {
%r{\Adoc/} => :none, # To reinstate roulette for documentation, set to `:docs`.
......@@ -125,7 +126,8 @@ module Gitlab
%r{\A(ee/)?spec/(?!javascripts|frontend)[^/]+} => :backend,
%r{\A(ee/)?vendor/(?!assets)[^/]+} => :backend,
%r{\A(ee/)?vendor/(languages\.yml|licenses\.csv)\z} => :backend,
%r{\A(Dangerfile|Gemfile|Gemfile.lock|Procfile|Rakefile|\.gitlab-ci\.yml)\z} => :backend,
%r{\A(\.gitlab-ci\.yml\z|\.gitlab\/ci)} => :engineering_productivity,
%r{\A(Dangerfile|Gemfile|Gemfile.lock|Procfile|Rakefile)\z} => :backend,
%r{\A[A-Z_]+_VERSION\z} => :backend,
%r{\A\.rubocop(_todo)?\.yml\z} => :backend,
......
......@@ -42,6 +42,8 @@ module Gitlab
area = role[/Test Automation Engineer(?:.*?, (\w+))/, 1]
area && labels.any?("devops::#{area.downcase}") if kind == :reviewer
when :engineering_productivity
role[/Engineering Productivity/] if kind == :reviewer
else
capabilities(project).include?("#{kind} #{category}")
end
......
......@@ -168,9 +168,13 @@ describe Gitlab::Danger::Helper do
'Gemfile.lock' | :backend
'Procfile' | :backend
'Rakefile' | :backend
'.gitlab-ci.yml' | :backend
'FOO_VERSION' | :backend
'.gitlab-ci.yml' | :engineering_productivity
'.gitlab/ci/cng.gitlab-ci.yml' | :engineering_productivity
'.gitlab/ci/ee-specific-checks.gitlab-ci.yml' | :engineering_productivity
'lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml' | :backend
'ee/FOO_VERSION' | :unknown
'db/schema.rb' | :database
......
......@@ -65,6 +65,18 @@ describe Gitlab::Danger::Teammate do
expect(subject.reviewer?(project, :test, labels)).to be_falsey
end
end
context 'when role is Backend Engineer, Engineering Productivity' do
let(:role) { 'Backend Engineer, Engineering Productivity' }
it '#reviewer? returns true' do
expect(subject.reviewer?(project, :engineering_productivity, labels)).to be_truthy
end
it '#maintainer? returns false' do
expect(subject.maintainer?(project, :engineering_productivity, labels)).to be_falsey
end
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment