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
221598f8
Commit
221598f8
authored
Jul 26, 2021
by
Rémy Coutable
Committed by
Albert Salim
Jul 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: Set QA_IMAGE via default and workflow.rules variables
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
26b971c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
28 deletions
+9
-28
.gitlab-ci.yml
.gitlab-ci.yml
+9
-2
.gitlab/ci/rules.gitlab-ci.yml
.gitlab/ci/rules.gitlab-ci.yml
+0
-26
No files found.
.gitlab-ci.yml
View file @
221598f8
...
...
@@ -36,9 +36,13 @@ workflow:
# they serve no purpose and will run anyway when the changes are merged.
-
if
:
'
$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
=~
/^release-tools\/\d+\.\d+\.\d+-rc\d+$/
&&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
=~
/^[\d-]+-stable(-ee)?$/
&&
$CI_PROJECT_PATH
==
"gitlab-org/gitlab"'
when
:
never
# For merge requests, create a pipeline.
# For merged result pipelines, set $QA_IMAGE, since $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA is only available for merged result pipelines.
-
if
:
'
$CI_MERGE_REQUEST_EVENT_TYPE
==
"merged_result"
||
$CI_MERGE_REQUEST_EVENT_TYPE
==
"merge_train"'
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
# Also run (detached) merge request pipelines.
-
if
:
'
$CI_MERGE_REQUEST_IID'
# For the 2-hourly scheduled pipelines, we set specific variables
# For the 2-hourly scheduled pipelines, we set specific variables
.
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH
&&
$CI_PIPELINE_SOURCE
==
"schedule"
&&
$FREQUENCY
==
"2-hourly"'
variables
:
CRYSTALBALL
:
"
true"
...
...
@@ -88,6 +92,9 @@ variables:
RSPEC_FAIL_FAST_ENABLED
:
"
true"
# Set it to "false" to disable RSpec fail-fast
SIMPLECOV
:
"
true"
# For the default QA image, we use $CI_COMMIT_SHA as tag since it's always available and we override it for specific workflow.rules (see above)
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_SHA}"
# Preparing custom clone path to reduce space used by all random forks
# on GitLab.com's Shared Runners. Our main forks - especially the security
# ones - will have this variable overwritten in the project settings, so that
...
...
.gitlab/ci/rules.gitlab-ci.yml
View file @
221598f8
...
...
@@ -370,19 +370,11 @@
when
:
never
-
<<
:
*if-dot-com-gitlab-org-and-security-merge-request
changes
:
*ci-build-images-patterns
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
-
<<
:
*if-dot-com-gitlab-org-and-security-merge-request
changes
:
*code-qa-patterns
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
-
<<
:
*if-dot-com-gitlab-org-default-branch
changes
:
*code-qa-patterns
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_SHA}"
-
<<
:
*if-dot-com-gitlab-org-schedule
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_SHA}"
.build-images:rules:build-assets-image:
rules
:
...
...
@@ -594,24 +586,16 @@
when
:
never
-
<<
:
*if-dot-com-gitlab-org-and-security-merge-request
changes
:
*ci-qa-patterns
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
allow_failure
:
true
-
<<
:
*if-dot-com-gitlab-org-and-security-merge-request
changes
:
*qa-patterns
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
allow_failure
:
true
-
<<
:
*if-dot-com-gitlab-org-and-security-merge-request
changes
:
*code-patterns
when
:
manual
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
allow_failure
:
true
-
<<
:
*if-dot-com-gitlab-org-schedule
allow_failure
:
true
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_SHA}"
###############
# Rails rules #
...
...
@@ -1298,17 +1282,11 @@
when
:
never
-
<<
:
*if-dot-com-gitlab-org-merge-request
changes
:
*ci-review-patterns
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
-
<<
:
*if-dot-com-gitlab-org-merge-request
changes
:
*frontend-patterns
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
allow_failure
:
true
-
<<
:
*if-dot-com-gitlab-org-merge-request
changes
:
*code-qa-patterns
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
allow_failure
:
true
# The rule needs to be duplicated between `on_success` and `on_failure`
...
...
@@ -1344,13 +1322,9 @@
-
<<
:
*if-dot-com-gitlab-org-merge-request
changes
:
*code-patterns
when
:
manual
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
allow_failure
:
true
-
<<
:
*if-dot-com-gitlab-org-merge-request
changes
:
*qa-patterns
variables
:
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
allow_failure
:
true
# The rule needs to be duplicated between `on_success` and `on_failure`
...
...
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