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
cb972537
Commit
cb972537
authored
Sep 18, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the scheduled review jobs and simplify their definitions
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
5b126d9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
54 deletions
+77
-54
.gitlab/ci/global.gitlab-ci.yml
.gitlab/ci/global.gitlab-ci.yml
+1
-1
.gitlab/ci/reports.gitlab-ci.yml
.gitlab/ci/reports.gitlab-ci.yml
+2
-0
.gitlab/ci/review.gitlab-ci.yml
.gitlab/ci/review.gitlab-ci.yml
+74
-53
No files found.
.gitlab/ci/global.gitlab-ci.yml
View file @
cb972537
...
...
@@ -102,7 +102,7 @@
refs
:
-
schedules
variables
:
-
$
REVIEW_APP_CLEANUP && $
CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
-
$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
kubernetes
:
active
.use-pg
:
...
...
.gitlab/ci/reports.gitlab-ci.yml
View file @
cb972537
...
...
@@ -44,6 +44,8 @@ code_quality:
# We need to duplicate this job's definition because it seems it's impossible to
# override an included `only.refs`.
# See https://gitlab.com/gitlab-org/gitlab/issues/31371.
# Once https://gitlab.com/gitlab-org/gitlab/merge_requests/16487 will be deployed
# to GitLab.com, we should be able to use the template and set SAST_DISABLE_DIND: "true".
sast
:
extends
:
-
.default-retry
...
...
.gitlab/ci/review.gitlab-ci.yml
View file @
cb972537
.review-base
:
extends
:
-
.default-tags
-
.default-retry
-
.default-only
-
.only-review
-
.only-code-qa-changes
image
:
registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
dependencies
:
[]
before_script
:
-
source scripts/utils.sh
.review-docker
:
extends
:
-
.default-tags
...
...
@@ -41,6 +29,25 @@ build-qa-image:
-
echo "${CI_JOB_TOKEN}" | docker login --username gitlab-ci-token --password-stdin ${CI_REGISTRY}
-
time docker push ${QA_IMAGE}
schedule:review-cleanup:
extends
:
-
.default-tags
-
.default-retry
-
.default-only
-
.only-code-qa-changes
-
.only-review-schedules
stage
:
prepare
image
:
registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
allow_failure
:
true
environment
:
name
:
review/auto-cleanup
action
:
stop
before_script
:
-
source scripts/utils.sh
-
install_gitlab_gem
script
:
-
ruby -rrubygems scripts/review_apps/automated_cleanup.rb
.review-build-cng-base
:
extends
:
-
.default-only
...
...
@@ -68,9 +75,15 @@ schedule:review-build-cng:
needs
:
[
"
gitlab:assets:compile"
]
.review-deploy-base
:
extends
:
.review-base
allow_failure
:
true
extends
:
-
.default-tags
-
.default-retry
-
.default-only
-
.only-code-qa-changes
stage
:
review
image
:
registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
dependencies
:
[]
allow_failure
:
true
variables
:
HOST_SUFFIX
:
"
${CI_ENVIRONMENT_SLUG}"
DOMAIN
:
"
-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
...
...
@@ -105,6 +118,7 @@ schedule:review-build-cng:
review-deploy
:
extends
:
-
.review-deploy-base
-
.only-review
needs
:
[
"
review-build-cng"
]
schedule:review-deploy:
...
...
@@ -148,6 +162,7 @@ review-cleanup-failed-deployment:
-
.only-review
-
.only-code-qa-changes
stage
:
qa
allow_failure
:
true
variables
:
QA_ARTIFACTS_DIR
:
"
${CI_PROJECT_DIR}/qa"
QA_CAN_TEST_GIT_PROTOCOL_V2
:
"
false"
...
...
@@ -176,13 +191,11 @@ review-cleanup-failed-deployment:
review-qa-smoke
:
extends
:
.review-qa-base
allow_failure
:
true
script
:
-
gitlab-qa Test::Instance::Smoke "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}"
review-qa-all
:
extends
:
.review-qa-base
allow_failure
:
true
when
:
manual
parallel
:
5
script
:
...
...
@@ -190,39 +203,32 @@ review-qa-all:
-
export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb
-
gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec.htm --color --format documentation
parallel-spec-reports
:
.review-performance-base
:
extends
:
-
.default-tags
-
.default-only
-
.review-docker
-
.only-code-qa-changes
-
.only-review
image
:
ruby:2.6-alpine
stage
:
post-test
dependencies
:
[
"
review-qa-all"
]
variables
:
NEW_PARALLEL_SPECS_REPORT
:
qa/report-new.html
BASE_ARTIFACT_URL
:
"
${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/"
stage
:
qa
allow_failure
:
true
when
:
manual
before_script
:
-
export CI_ENVIRONMENT_URL="$(cat review_app_url.txt)"
-
echo "${CI_ENVIRONMENT_URL}"
-
mkdir -p gitlab-exporter
-
wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/master/index.js
-
mkdir -p sitespeed-results
script
:
-
docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:6.3.1 --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "${CI_ENVIRONMENT_URL}"
after_script
:
-
mv sitespeed-results/data/performance.json performance.json
artifacts
:
when
:
always
paths
:
-
qa/report-new.html
-
qa/gitlab-qa-run-*
-
sitespeed-results/
reports
:
junit
:
qa/gitlab-qa-run-*/**/rspec-*.xml
script
:
-
apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/*
-
gem install nokogiri --no-document
-
cd qa/gitlab-qa-run-*/gitlab-*
-
ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_)
-
cd -
-
'
[[
-f
$NEW_PARALLEL_SPECS_REPORT
]]
||
echo
"{}"
>
${NEW_PARALLEL_SPECS_REPORT}'
-
scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm
performance
:
performance.json
review-performance
:
extends
:
.review-qa-base
allow_failure
:
true
extends
:
-
.review-performance-base
-
.only-review
before_script
:
-
export CI_ENVIRONMENT_URL="$(cat review_app_url.txt)"
-
echo "${CI_ENVIRONMENT_URL}"
...
...
@@ -241,24 +247,39 @@ review-performance:
schedule:review-performance:
extends
:
-
review-performanc
e
-
.review-performance-bas
e
-
.only-review-schedules
dependencies
:
[
"
schedule:review-deploy"
]
schedule:review-cleanup
:
parallel-spec-reports
:
extends
:
-
.review-base
-
.only-review-schedules
stage
:
prepare
-
.default-tags
-
.default-only
-
.only-code-qa-changes
-
.only-review
image
:
ruby:2.6-alpine
stage
:
post-test
dependencies
:
[
"
review-qa-all"
]
variables
:
NEW_PARALLEL_SPECS_REPORT
:
qa/report-new.html
BASE_ARTIFACT_URL
:
"
${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/"
allow_failure
:
true
environment
:
name
:
review/auto-cleanup
action
:
stop
before_script
:
-
source scripts/utils.sh
-
install_gitlab_gem
when
:
manual
artifacts
:
when
:
always
paths
:
-
qa/report-new.html
-
qa/gitlab-qa-run-*
reports
:
junit
:
qa/gitlab-qa-run-*/**/rspec-*.xml
script
:
-
ruby -rrubygems scripts/review_apps/automated_cleanup.rb
-
apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/*
-
gem install nokogiri --no-document
-
cd qa/gitlab-qa-run-*/gitlab-*
-
ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_)
-
cd -
-
'
[[
-f
$NEW_PARALLEL_SPECS_REPORT
]]
||
echo
"{}"
>
${NEW_PARALLEL_SPECS_REPORT}'
-
scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm
danger-review
:
extends
:
...
...
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