Skip to content

Commit f42c42c

Browse files
Vishal Patelbalasankarc
authored andcommitted
Adding manual job to run entire test suite
1 parent c74c850 commit f42c42c

File tree

8 files changed

+91
-41
lines changed

8 files changed

+91
-41
lines changed

doc/development/allure-test-report.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The following three pipelines are created while generating the allure-report
44

55
- Omnibus pipeline
66
- TRIGGERED_CE/EE_PIPELINE child pipeline (Manually Triggered)
7-
- QA-TEST child pipeline
7+
- QA-SUBSET-TEST child pipeline
88

99
## Omnibus MR Pipeline
1010

@@ -26,27 +26,33 @@ The child pipeline, called `TRIGGERED_CE/EE_PIPELINE` is generated in the Omnibu
2626

2727
## TRIGGERED_CE/EE_PIPELINE child pipeline
2828

29-
This child pipeline consists of a job called `qa-test` which uses the `package-and-test/main.gitlab-ci.yml` file of the main GitLab project.
29+
This child pipeline consists of a job called `qa-subset-test` which uses the `package-and-test/main.gitlab-ci.yml` file of the main GitLab project.
3030

31-
### qa-test job
31+
### qa-subset-test job
3232

33-
The `qa-test` job triggers another child pipeline in the Omnibus-GitLab repository
34-
To get an allure report snapshot as a comment in the MR, following environment variables need to be passed to `qa-job`
33+
The `qa-subset-test` job triggers another child pipeline in the Omnibus-GitLab repository
34+
To get an allure report snapshot as a comment in the MR, following environment variables need to be passed to `qa-subset-test`
3535

3636
| Environment Variable | Description |
3737
| ----------------------------------|-------------|
3838
| `GITLAB_AUTH_TOKEN` | This is used to give access to the Danger bot to post comment in `omnibus-gitlab` repository. We are using `$DANGER_GITLAB_API_TOKEN` which is also being used for other Danger bot related access in `omnibugs-gitlab` as mentioned [ci-variable](https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/doc/development/ci-variables.md) |
3939
| `ALLURE_MERGE_REQUEST_IID` | This denotes the MR ID which will be used by [e2e-test-report-job](#e2e-test-report-job) which inturn used `allure-report-publisher` to post message to MR with provided ID e.g. !6190 |
4040

41-
## QA-TEST child pipeline
41+
### qa-remaining-test-manual
4242

43-
This pipeline runs all the orchestrated tests using GitLab QA project which in turn uses allure gem to generate report source files for each test that is executed and stores the files in a common folder.
43+
The `qa-remaining-test-manual` job is a manual trigger pipeline. It triggers the same pipeline as `qa-subset-test` but runs the tests which aren't run as a part of `qa-subset-test` job.
44+
45+
The environment variables used in `qa-subset-test` are the same that are used in this job to generate the allure report.
46+
47+
## QA-SUBSET-TEST child pipeline
48+
49+
This pipeline runs a subset of all the orchestrated tests using GitLab QA project which in turn uses allure gem to generate report source files for each test that is executed and stores the files in a common folder. Certain orchestrated jobs like `instance`, `decomposition-single-db`, `decomposition-multiple-db` and `praefect` run only smoke and reliable tests which intially used to run the entire suite.
4450

4551
### e2e-test-report job
4652

4753
The `e2e-test-report` job includes [.generate-allure-report-base](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/allure-report.yml) job which uses the `allure-report-publisher` gem to collate all the report in the mentioned folder into a single report and uploads it to the s3 bucket.
4854

49-
It also posts the allure report as a comment on the MR having the ID passed in `ALLURE_MERGE_REQUEST_IID` variable in the [qa-test-job](#qa-test-job).
55+
It also posts the allure report as a comment on the MR having the ID passed in `ALLURE_MERGE_REQUEST_IID` variable in the [qa-subset-test](#qa-subset-test-job).
5056

5157
[allure-report-publisher](https://github.com/andrcuns/allure-report-publisher) is a gem which uses allure in the backend. It has been catered for GitLab to upload the report and post the comment to MR.
5258

@@ -73,11 +79,11 @@ subgraph QA flow in omnibus pipeline
7379
end
7480
7581
subgraph Trigger:CE/EE-job Child Pipeline
76-
A1["`**_trigger-qa_** stage <br> **_qa-test_** job`"]
82+
A1["`**_trigger-qa_** stage <br> **_qa-subset-test_** job`"]
7783
A3(["`_package-and-test/main.gitlab-ci.yml_ <br> from _gitlab-org/gitlab_`"])
7884
end
7985
80-
subgraph qa-test Child Pipeline
86+
subgraph qa-subset-test Child Pipeline
8187
A2["`from <br> **_package-and-test/main.gitlab-ci.yml_** in **_gitlab-org/gitlab_**`"]
8288
B1["`**_report_** stage <br> **_e2e-test-report_** job`"]
8389
B2(["`_.generate-allure-report-base_ job from<br> _quality/pipeline-common_`"])

doc/development/ci-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ These additional variables are available to override or enable different build b
6666
| `DEPS_GITLAB_TOKEN` | Token used by [dependencies.io](https://www.dependencies.io/gitlab/) to create MRs. |
6767
| `DEPS_TOKEN` | Token used by CI to auth to [dependencies.io](https://www.dependencies.io/gitlab/). |
6868
| `DOCS_API_TOKEN` | Token used by CI to trigger a review-app build of the docs site. |
69-
| `MANUAL_QA_TEST` | Variable used to decide if the `qa-test` job should be played automatically or not. |
69+
| `MANUAL_QA_TEST` | Variable used to decide if the `qa-subset-test` job should be played automatically or not. |
7070

7171
## Release variables
7272

doc/development/pipelines.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,25 @@ This job builds a GitLab Docker image using the package that was built by
287287

288288
This job is run only on [QA mirror](https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror) on triggered pipelines.
289289

290-
#### `qa-test`
290+
#### `qa-subset-test`
291291

292-
This job triggers a pipeline in the [GitLab QA Mirror](https://gitlab.com/gitlab-org/gitlab-qa-mirror), passing the GitLab
293-
Docker image created by `Trigger:gitlab-docker` job and the GitLab QA Docker
294-
image built by the GitLab Rails pipeline, so that a full QA run will be run
295-
against up using these images
292+
This job runs subset of test suite and is automatically triggered when either
293+
`Trigger:CE-package` or `Trigger:EE-package` manual jobs are triggered manually.
294+
295+
This job triggers a pipeline in the [GitLab QA Mirror](https://gitlab.com/gitlab-org/gitlab-qa-mirror), passing the GitLab Docker image created by `Trigger:gitlab-docker` job and the GitLab QA Docker image built by the GitLab Rails pipeline, so that a subset of test as mentioned in [this issue](https://gitlab.com/gitlab-org/distribution/team-tasks/-/issues/1303#we-should-keep) will run using these images
296296

297297
This job is run only on [QA mirror](https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror) on triggered pipelines.
298298

299+
### `qa-remaining-test-manual`
300+
301+
This is a manual trigger job which runs the remaining tests that donot run in the `qa-subset-test` job.
302+
303+
To run this QA jobs in MR pipeline, you need to either trigger `Trigger:CE-package` or `Trigger:EE-package` manual jobs.
304+
305+
This job triggers a pipeline in the [GitLab QA Mirror](https://gitlab.com/gitlab-org/gitlab-qa-mirror), passing the GitLab
306+
Docker image created by `Trigger:gitlab-docker` job and the GitLab QA Docker
307+
image built by the GitLab Rails pipeline, so that the entire suite is run using these images.
308+
299309
#### `RAT`
300310

301311
This manual job triggers a pipeline in the

doc/development/upgrading-software-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ At a minimum, the following tests should be performed when updating a software
115115
component.
116116

117117
- Perform a successful GitLab Enterprise Edition (EE) build on all supported platforms.
118-
- Run `qa-test` CI/CD test job for both GitLab Enterprise Edition and GitLab Community Edition.
118+
- Run `qa-subset-test` as well as manual `qa-remaining-test-manual` CI/CD test job for both GitLab Enterprise Edition and GitLab Community Edition.
119119
- Install and verify that component version has been upgraded.
120120
- Verify basic functionality of the software component.
121121

gitlab-ci-config/gitlab-com.yml

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,27 @@
223223
- if: '$PIPELINE_TYPE == "DOCS_PIPELINE"'
224224
when: manual
225225

226+
.qa-template:
227+
variables:
228+
QA_RUN_ALL_TESTS: "false"
229+
RELEASE: $QA_RELEASE
230+
QA_IMAGE: $QA_IMAGE
231+
GITLAB_SEMVER_VERSION: $GITLAB_SEMVER_VERSION # latest semver gitlab version used for testing upgrade paths
232+
SKIP_OMNIBUS_TRIGGER: "true"
233+
GITLAB_AUTH_TOKEN: $DANGER_GITLAB_API_TOKEN
234+
ALLURE_MERGE_REQUEST_IID: $CI_MERGE_REQUEST_IID
235+
inherit:
236+
variables: false
237+
trigger:
238+
strategy: depend
239+
forward:
240+
yaml_variables: true
241+
pipeline_variables: true
242+
include:
243+
- project: gitlab-org/gitlab
244+
ref: master
245+
file: .gitlab/ci/package-and-test/main.gitlab-ci.yml
246+
226247
#####################
227248
# Cache update jobs #
228249
#####################
@@ -557,28 +578,14 @@ Trigger:gitlab-docker:
557578
optional: true
558579
artifacts: true
559580

560-
qa-test:
581+
qa-subset-test:
582+
extends:
583+
- .qa-template
561584
stage: trigger-qa
562585
variables:
563-
RELEASE: $QA_RELEASE
564-
QA_IMAGE: $QA_IMAGE
565-
QA_RUN_ALL_TESTS: "false"
566-
QA_SUITES: "QA::Scenario::Test::Integration::GitalyCluster,QA::Scenario::Test::Integration::InstanceSAML,QA::Scenario::Test::Integration::LDAPNoServer,QA::Scenario::Test::Integration::LDAPNoTLS,QA::Scenario::Test::Integration::LDAPTLS,QA::Scenario::Test::Integration::Mattermost,QA::Scenario::Test::Integration::Mtls,QA::Scenario::Test::Integration::ObjectStorageGcs,QA::Scenario::Test::Integration::RegistryTLS,QA::Scenario::Test::Integration::RegistryWithCDN,QA::Scenario::Test::Integration::SMTP,QA::Scenario::Test::Integration::Registry,QA::Scenario::Test::Instance::ObjectStorage,QA::Scenario::Test::Instance::RepositoryStorage,QA::Scenario::Test::Instance::GitlabPages,QA::Scenario::Test::Instance::Metrics,QA::EE::Scenario::Test::Integration::GroupSAML,QA::Scenario::Test::Instance::All,QA::Scenario::Test::Instance::Smoke"
567-
GITLAB_SEMVER_VERSION: $GITLAB_SEMVER_VERSION # latest semver gitlab version used for testing upgrade paths
568-
SKIP_OMNIBUS_TRIGGER: "true"
569-
GITLAB_AUTH_TOKEN: $DANGER_GITLAB_API_TOKEN
570-
ALLURE_MERGE_REQUEST_IID: $CI_MERGE_REQUEST_IID
571-
inherit:
572-
variables: false
573-
trigger:
574-
strategy: depend
575-
forward:
576-
yaml_variables: true
577-
pipeline_variables: true
578-
include:
579-
- project: gitlab-org/gitlab
580-
ref: master
581-
file: .gitlab/ci/package-and-test/main.gitlab-ci.yml
586+
QA_OMNIBUS_MR_TESTS: "only-smoke-reliable"
587+
QA_RUN_TYPE: ${CI_JOB_NAME}
588+
QA_SUITES: "QA::Scenario::Test::Integration::GitalyCluster,QA::Scenario::Test::Integration::InstanceSAML,QA::Scenario::Test::Integration::LDAPNoServer,QA::Scenario::Test::Integration::LDAPNoTLS,QA::Scenario::Test::Integration::LDAPTLS,QA::Scenario::Test::Integration::Mattermost,QA::Scenario::Test::Integration::Mtls,QA::Scenario::Test::Integration::ObjectStorageGcs,QA::Scenario::Test::Integration::RegistryTLS,QA::Scenario::Test::Integration::RegistryWithCDN,QA::Scenario::Test::Integration::SMTP,QA::Scenario::Test::Integration::Registry,QA::Scenario::Test::Instance::ObjectStorage,QA::Scenario::Test::Instance::RepositoryStorage,QA::Scenario::Test::Instance::GitlabPages,QA::Scenario::Test::Instance::Metrics,QA::EE::Scenario::Test::Integration::GroupSAML,QA::Scenario::Test::Instance::Smoke"
582589
rules:
583590
- if: '$SKIP_QA_TEST == "true"'
584591
when: never
@@ -602,6 +609,33 @@ qa-test:
602609
- job: Trigger:gitlab-docker
603610
artifacts: false
604611

612+
qa-remaining-test-manual:
613+
extends:
614+
- .qa-template
615+
stage: trigger-qa
616+
variables:
617+
QA_RUN_TYPE: ${CI_JOB_NAME}
618+
QA_OMNIBUS_MR_TESTS: "except-smoke-reliable"
619+
QA_SUITES: "QA::EE::Scenario::Test::Integration::Elasticsearch,QA::Scenario::Test::Integration::Import,QA::Scenario::Test::Integration::Integrations,QA::Scenario::Test::Integration::OAuth,QA::Scenario::Test::Integration::Jira,QA::Scenario::Test::Integration::ServicePingDisabled,QA::Scenario::Test::Instance::LargeSetup,QA::Scenario::Test::Instance::CloudActivation"
620+
rules:
621+
- if: '$SKIP_QA_TEST == "true"'
622+
when: never
623+
- if: '$PIPELINE_TYPE =~ /TRIGGERED_CE_PIPELINE/'
624+
when: manual
625+
allow_failure: true
626+
variables:
627+
FOSS_ONLY: "1"
628+
- if: '$PIPELINE_TYPE =~ /TRIGGERED_EE_PIPELINE/'
629+
when: manual
630+
allow_failure: true
631+
needs:
632+
- job: generate-facts
633+
artifacts: true
634+
- job: Trigger:package
635+
artifacts: false
636+
- job: Trigger:gitlab-docker
637+
artifacts: false
638+
605639
letsencrypt-test:
606640
extends: .docker_job
607641
stage: trigger-qa

test-plans/upgrade-component-testplan-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Add the component test-plan here. Use "[ ]" for each step/task to be completed.
99
At a minimum, the following test should be run:
1010
1111
- [ ] Performed a successful GitLab Enterprise Edition (EE) build on all supported platforms.
12-
- [ ] Ran `qa-test` CI/CD test job for both GitLab Enterprise Edition and GitLab Community Edition.
12+
- [ ] Ran `qa-subset-test` CI/CD test job for both GitLab Enterprise Edition and GitLab Community Edition.
1313
- [ ] Installed and verified that the component version has been upgraded.
1414
- [ ] Verified basic functionality of the software component.
1515
-->

test-plans/upgrade-mattermost-testplan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
### Build tests
77

88
- [ ] Built on all supported platforms
9-
- [ ] Ran `Trigger:ee-package` and then `qa-test` CI jobs on `gitlab.com`.
9+
- [ ] Ran `Trigger:ee-package` and then `qa-subset-test` as well as manual `qa-remaining-test-manual` CI jobs on `gitlab.com`.
1010

1111
### Fresh installation tests
1212

test-plans/upgrade-redis-testplan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# redis component upgrade test plan
1+
# Redis component upgrade test plan
22

33
<!-- Copy and paste the following into your MR description. -->
44
## Test plan
55

66
- [ ] Performed a successful GitLab Enterprise Edition (EE) build on all supported platforms (include `build-package-on-all-os` job).
7-
- [ ] Ran `qa-test` CI/CD test job for both GitLab Enterprise Edition and GitLab Community Edition.
7+
- [ ] Ran `qa-subset-test` as well as manual `qa-remaining-test-manual` CI/CD test job for both GitLab Enterprise Edition and GitLab Community Edition.
88
- [ ] Redis indicator test cases were not failing.
99
- [realtime components via assignee test](https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347941)
1010
- [project template import](https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347932)

0 commit comments

Comments
 (0)