Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3b9238b7
Commit
3b9238b7
authored
Sep 05, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
395dbfa0
f7e7ee71
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
10 deletions
+46
-10
.gitlab-ci.yml
.gitlab-ci.yml
+1
-0
.gitlab/ci/frontend.gitlab-ci.yml
.gitlab/ci/frontend.gitlab-ci.yml
+4
-5
.gitlab/ci/rails.gitlab-ci.yml
.gitlab/ci/rails.gitlab-ci.yml
+12
-0
.gitlab/ci/review.gitlab-ci.yml
.gitlab/ci/review.gitlab-ci.yml
+4
-2
.gitlab/ci/setup.gitlab-ci.yml
.gitlab/ci/setup.gitlab-ci.yml
+2
-0
lib/gitlab/danger/helper.rb
lib/gitlab/danger/helper.rb
+4
-2
lib/gitlab/danger/teammate.rb
lib/gitlab/danger/teammate.rb
+2
-0
spec/lib/gitlab/danger/helper_spec.rb
spec/lib/gitlab/danger/helper_spec.rb
+5
-1
spec/lib/gitlab/danger/teammate_spec.rb
spec/lib/gitlab/danger/teammate_spec.rb
+12
-0
No files found.
.gitlab-ci.yml
View file @
3b9238b7
...
...
@@ -5,6 +5,7 @@ stages:
-
prepare
-
quick-test
-
test
-
review-prepare
-
review
-
qa
-
post-test
...
...
.gitlab/ci/frontend.gitlab-ci.yml
View file @
3b9238b7
...
...
@@ -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
:
...
...
.gitlab/ci/rails.gitlab-ci.yml
View file @
3b9238b7
...
...
@@ -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
:
...
...
.gitlab/ci/review.gitlab-ci.yml
View file @
3b9238b7
...
...
@@ -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}"
...
...
.gitlab/ci/setup.gitlab-ci.yml
View file @
3b9238b7
...
...
@@ -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
:
...
...
lib/gitlab/danger/helper.rb
View file @
3b9238b7
...
...
@@ -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{
\A
doc/}
=>
: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
,
...
...
lib/gitlab/danger/teammate.rb
View file @
3b9238b7
...
...
@@ -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
...
...
spec/lib/gitlab/danger/helper_spec.rb
View file @
3b9238b7
...
...
@@ -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
...
...
spec/lib/gitlab/danger/teammate_spec.rb
View file @
3b9238b7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment