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
919567ac
Commit
919567ac
authored
Dec 31, 2019
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run the scheduled QA only when it's a schedule
To eliminate branch pipeline
parent
db3e5019
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
29 deletions
+32
-29
.gitlab/ci/qa.gitlab-ci.yml
.gitlab/ci/qa.gitlab-ci.yml
+11
-7
.gitlab/ci/review.gitlab-ci.yml
.gitlab/ci/review.gitlab-ci.yml
+12
-10
doc/development/pipelines.md
doc/development/pipelines.md
+1
-4
doc/development/testing_guide/end_to_end/index.md
doc/development/testing_guide/end_to_end/index.md
+4
-4
doc/development/testing_guide/end_to_end/page_objects.md
doc/development/testing_guide/end_to_end/page_objects.md
+3
-3
qa/README.md
qa/README.md
+1
-1
No files found.
.gitlab/ci/qa.gitlab-ci.yml
View file @
919567ac
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-and-merge-request
:
&if-canonical-gitlab-and-merge-request
.if-canonical-gitlab-schedule
:
&if-canonical-gitlab-schedule
if
:
'
$CI_SERVER_HOST
==
"gitlab.com"
&&
$CI_PROJECT_NAMESPACE
=~
/^gitlab-org($|\/)/
&&
$CI_PIPELINE_SOURCE
==
"schedule"'
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-merge-request
:
&if-canonical-gitlab-merge-request
if
:
'
$CI_SERVER_HOST
==
"gitlab.com"
&&
$CI_PROJECT_NAMESPACE
=~
/^gitlab-org($|\/)/
&&
$CI_MERGE_REQUEST_IID'
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
...
...
@@ -68,19 +72,19 @@ qa:selectors-foss:
package-and-qa
:
extends
:
.package-and-qa-base
rules
:
-
<<
:
*if-canonical-gitlab-
and-
merge-request
-
<<
:
*if-canonical-gitlab-merge-request
changes
:
*qa-patterns
when
:
on_success
-
<<
:
*if-canonical-gitlab-
and-
merge-request
-
<<
:
*if-canonical-gitlab-merge-request
changes
:
*code-patterns
when
:
manual
needs
:
[
"
build-qa-image"
,
"
gitlab:assets:compile
pull-cache"
]
allow_failure
:
true
schedule:package-and-qa:
extends
:
-
.package-and-qa-base
-
.default-only
-
.only:variables_refs-canonical-dot-com-schedule
s
extends
:
.package-and-qa-base
rules
:
-
<<
:
*if-canonical-gitlab-schedule
when
:
on_succes
s
needs
:
[
"
build-qa-image"
,
"
gitlab:assets:compile
pull-cache"
]
allow_failure
:
true
.gitlab/ci/review.gitlab-ci.yml
View file @
919567ac
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab
:
&if-canonical-gitlab
if
:
'
$CI_SERVER_HOST
==
"gitlab.com"
&&
$CI_PROJECT_NAMESPACE
=~
/^gitlab-org($|\/)/'
.if-canonical-gitlab
-schedule
:
&if-canonical-gitlab-schedule
if
:
'
$CI_SERVER_HOST
==
"gitlab.com"
&&
$CI_PROJECT_NAMESPACE
=~
/^gitlab-org($|\/)/
&&
$CI_PIPELINE_SOURCE
==
"schedule"
'
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-
and-merge-request
:
&if-canonical-gitlab-and
-merge-request
.if-canonical-gitlab-
merge-request
:
&if-canonical-gitlab
-merge-request
if
:
'
$CI_SERVER_HOST
==
"gitlab.com"
&&
$CI_PROJECT_NAMESPACE
=~
/^gitlab-org($|\/)/
&&
$CI_MERGE_REQUEST_IID'
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
...
...
@@ -44,9 +44,11 @@ build-qa-image:
extends
:
.review-docker
stage
:
prepare
rules
:
-
<<
:
*if-canonical-gitlab
-
<<
:
*if-canonical-gitlab
-merge-request
changes
:
*code-qa-patterns
when
:
on_success
-
<<
:
*if-canonical-gitlab-schedule
when
:
on_success
script
:
-
'
[[
!
-d
"ee/"
]]
||
export
GITLAB_EDITION="ee"'
-
export QA_MASTER_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab/gitlab-${GITLAB_EDITION}-qa:master"
...
...
@@ -157,7 +159,7 @@ schedule:review-build-cng:
review-deploy
:
extends
:
.review-deploy-base
rules
:
-
<<
:
*if-canonical-gitlab-
and-
merge-request
-
<<
:
*if-canonical-gitlab-merge-request
changes
:
*code-qa-patterns
when
:
on_success
...
...
@@ -184,7 +186,7 @@ review-stop-failed-deployment:
extends
:
.base-review-stop
stage
:
prepare
rules
:
-
<<
:
*if-canonical-gitlab-
and-
merge-request
-
<<
:
*if-canonical-gitlab-merge-request
changes
:
*code-qa-patterns
when
:
on_success
script
:
...
...
@@ -194,7 +196,7 @@ review-stop:
extends
:
.base-review-stop
stage
:
review
rules
:
-
<<
:
*if-canonical-gitlab-
and-
merge-request
-
<<
:
*if-canonical-gitlab-merge-request
changes
:
*code-qa-patterns
when
:
manual
allow_failure
:
true
...
...
@@ -235,7 +237,7 @@ review-stop:
review-qa-smoke
:
extends
:
.review-qa-base
rules
:
-
<<
:
*if-canonical-gitlab-
and-
merge-request
-
<<
:
*if-canonical-gitlab-merge-request
changes
:
*code-qa-patterns
when
:
on_success
script
:
...
...
@@ -244,7 +246,7 @@ review-qa-smoke:
review-qa-all
:
extends
:
.review-qa-base
rules
:
-
<<
:
*if-canonical-gitlab-
and-
merge-request
-
<<
:
*if-canonical-gitlab-merge-request
changes
:
*code-qa-patterns
when
:
manual
parallel
:
5
...
...
@@ -276,7 +278,7 @@ review-qa-all:
review-performance
:
extends
:
.review-performance-base
rules
:
-
<<
:
*if-canonical-gitlab-
and-
merge-request
-
<<
:
*if-canonical-gitlab-merge-request
changes
:
*code-qa-patterns
when
:
on_success
needs
:
[
"
review-deploy"
]
...
...
doc/development/pipelines.md
View file @
919567ac
...
...
@@ -156,7 +156,7 @@ This is similar to the `.only:variables-canonical-dot-com` + `.except:refs-maste
CI definitions:
```
yaml
.if-canonical-gitlab-
and-merge-request
:
&if-canonical-gitlab-and
-merge-request
.if-canonical-gitlab-
merge-request
:
&if-canonical-gitlab
-merge-request
if
:
'
$CI_SERVER_HOST
==
"gitlab.com"
&&
$CI_PROJECT_NAMESPACE
=~
/^gitlab-org($|\/)/
&&
$CI_MERGE_REQUEST_IID'
```
...
...
@@ -212,7 +212,6 @@ graph RL;
O[static-analysis];
P["schedule:package-and-qa<br/>(master schedule only)"];
Q[package-and-qa];
R[package-and-qa-manual];
S["RSpec<br/>(e.g. rspec unit pg9)"]
T[retrieve-tests-metadata];
...
...
@@ -259,8 +258,6 @@ subgraph "`review` stage"
subgraph "`qa` stage"
Q --> |needs| C;
Q --> |needs| F;
R --> |needs| C;
R --> |needs| F;
P --> |needs| C;
P --> |needs| F;
review-qa-smoke -.-> |needs and depends on| G;
...
...
doc/development/testing_guide/end_to_end/index.md
View file @
919567ac
...
...
@@ -27,11 +27,11 @@ You can find these nightly pipelines at `https://gitlab.com/gitlab-org/quality/s
### Testing code in merge requests
#### Using the `package-and-qa
-manual
` job
#### Using the `package-and-qa` job
It is possible to run end-to-end tests for a merge request, eventually being run in
a pipeline in the
[
`gitlab-qa`
](
https://gitlab.com/gitlab-org/gitlab-qa/
)
project,
by triggering the
`package-and-qa
-manual
`
manual action in the
`test`
stage (not
by triggering the
`package-and-qa`
manual action in the
`test`
stage (not
available for forks).
**
This runs end-to-end tests against a custom Omnibus package built from your
...
...
@@ -53,7 +53,7 @@ graph LR
B2[`Trigger-qa` stage<br>`Trigger:qa-test` job] -.->|2. Triggers a gitlab-qa pipeline and wait for it to be done| A3
subgraph "gitlab-foss/gitlab pipeline"
A1[`test` stage<br>`package-and-qa
-manual
` job]
A1[`test` stage<br>`package-and-qa` job]
end
subgraph "omnibus-gitlab pipeline"
...
...
@@ -61,7 +61,7 @@ subgraph "omnibus-gitlab pipeline"
end
subgraph "gitlab-qa pipeline"
A3>QA jobs run] -.->|3. Reports back the pipeline result to the `package-and-qa
-manual
` job<br>and post the result on the original commit tested| A1
A3>QA jobs run] -.->|3. Reports back the pipeline result to the `package-and-qa` job<br>and post the result on the original commit tested| A1
end
```
...
...
doc/development/testing_guide/end_to_end/page_objects.md
View file @
919567ac
...
...
@@ -40,7 +40,7 @@ the time it would take to build packages and test everything.
That is why when someone changes
`t.text_field :login`
to
`t.text_field :username`
in the _new session_ view we won't know about this
change until our GitLab QA nightly pipeline fails, or until someone triggers
`package-and-qa
-manual
`
action in their merge request.
`package-and-qa`
action in their merge request.
Obviously such a change would break all tests. We call this problem a _fragile
tests problem_.
...
...
qa/README.md
View file @
919567ac
...
...
@@ -30,7 +30,7 @@ and corresponding views / partials / selectors in CE / EE.
Whenever
`qa:selectors`
job fails in your merge request, you are supposed to
fix
[
page objects
](
../doc/development/testing_guide/end_to_end/page_objects.md
)
. You should also trigger end-to-end tests
using
`package-and-qa
-manual
`
manual action, to test if everything works fine.
using
`package-and-qa`
manual action, to test if everything works fine.
## How can I use it?
...
...
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