gitlab-qa 6.22.1 → 7.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +32 -31
- data/docs/configuring_omnibus.md +208 -0
- data/docs/what_tests_can_be_run.md +46 -8
- data/gitlab-qa.gemspec +6 -4
- data/lib/gitlab/qa.rb +7 -0
- data/lib/gitlab/qa/component/base.rb +2 -2
- data/lib/gitlab/qa/component/elasticsearch.rb +1 -1
- data/lib/gitlab/qa/component/gitlab.rb +35 -24
- data/lib/gitlab/qa/component/internet_tunnel.rb +4 -1
- data/lib/gitlab/qa/component/jira.rb +1 -1
- data/lib/gitlab/qa/component/ldap.rb +1 -1
- data/lib/gitlab/qa/component/mail_hog.rb +1 -1
- data/lib/gitlab/qa/component/minio.rb +3 -11
- data/lib/gitlab/qa/component/postgresql.rb +1 -1
- data/lib/gitlab/qa/component/saml.rb +1 -1
- data/lib/gitlab/qa/component/specs.rb +10 -2
- data/lib/gitlab/qa/docker/engine.rb +37 -6
- data/lib/gitlab/qa/runner.rb +57 -5
- data/lib/gitlab/qa/runtime/env.rb +2 -0
- data/lib/gitlab/qa/runtime/omnibus_configuration.rb +70 -0
- data/lib/gitlab/qa/runtime/omnibus_configurations/default.rb +25 -0
- data/lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb +48 -0
- data/lib/gitlab/qa/runtime/omnibus_configurations/packages.rb +17 -0
- data/lib/gitlab/qa/scenario/cli_commands.rb +3 -3
- data/lib/gitlab/qa/scenario/test/instance/relative_url.rb +1 -3
- data/lib/gitlab/qa/scenario/test/instance/repository_storage.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/actioncable.rb +1 -3
- data/lib/gitlab/qa/scenario/test/integration/geo.rb +4 -5
- data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +4 -5
- data/lib/gitlab/qa/scenario/test/integration/group_saml.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/instance_saml.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/kubernetes.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/ldap.rb +1 -4
- data/lib/gitlab/qa/scenario/test/integration/ldap_no_server.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/ldap_no_tls.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/ldap_tls.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/mattermost.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +2 -2
- data/lib/gitlab/qa/scenario/test/integration/smtp.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/ssh_tunnel.rb +1 -1
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +12 -9
- data/lib/gitlab/qa/scenario/test/integration/object_storage.rb +0 -64
- data/lib/gitlab/qa/scenario/test/integration/packages.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32809b6a435a4f885da425ee4f02b947731e5cc703c88353b0b4449521c7fd4b
|
4
|
+
data.tar.gz: 00e470d8140455b32fe9296ae2bde313fda2c9df4c370cd84b4e4247d72a7e01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16d8eea53beb93f9fe3265043541e308a1bc654be3151f79d78ca14346e9f56b67c3bfed86347239c33a9c0b32a3cf2f636c23b5392bb075ec1f3fa78741dc25
|
7
|
+
data.tar.gz: 3a483c5288e75f21418b98f9a52d991a3081fb380816d851d7e9e142b5989202243ad25fbba50ef339bcf14f927f9d392cff084ab1f8274edc9f61ca22371d5d
|
data/.gitlab-ci.yml
CHANGED
@@ -12,13 +12,14 @@ default:
|
|
12
12
|
cache:
|
13
13
|
key:
|
14
14
|
files:
|
15
|
-
- Gemfile
|
15
|
+
- Gemfile.lock
|
16
16
|
- gitlab-qa.gemspec
|
17
17
|
paths:
|
18
18
|
- vendor/ruby
|
19
19
|
before_script:
|
20
20
|
- bundle version
|
21
|
-
- bundle
|
21
|
+
- bundle config path vendor
|
22
|
+
- bundle install --jobs=$(nproc) --retry=3 --quiet && bundle check
|
22
23
|
- if [ -n "$TRIGGERED_USER" ] && [ -n "$TRIGGER_SOURCE" ]; then
|
23
24
|
echo "Pipeline triggered by $TRIGGERED_USER at $TRIGGER_SOURCE";
|
24
25
|
fi
|
@@ -74,9 +75,9 @@ rspec:
|
|
74
75
|
reports:
|
75
76
|
junit: gitlab-qa-run-*/**/rspec-*.xml
|
76
77
|
script:
|
77
|
-
- 'echo "Running: exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
|
78
|
-
- exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
79
|
-
- exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
|
78
|
+
- 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
|
79
|
+
- bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
80
|
+
- bundle exec exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
|
80
81
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
81
82
|
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
82
83
|
- exit $test_run_exit_code
|
@@ -152,7 +153,7 @@ rspec:
|
|
152
153
|
|
153
154
|
ce:sanity-framework:
|
154
155
|
script:
|
155
|
-
- ./bin/expect_exit_code_and_text "exe/gitlab-qa Test::Instance::Image ${RELEASE:=CE} -- --tag framework" 1 "2 examples, 1 failure"
|
156
|
+
- ./bin/expect_exit_code_and_text "bundle exec exe/gitlab-qa Test::Instance::Image ${RELEASE:=CE} -- --tag framework" 1 "2 examples, 1 failure"
|
156
157
|
extends:
|
157
158
|
- .test
|
158
159
|
- .high-capacity
|
@@ -160,7 +161,7 @@ ce:sanity-framework:
|
|
160
161
|
|
161
162
|
ee:sanity-framework:
|
162
163
|
script:
|
163
|
-
- ./bin/expect_exit_code_and_text "exe/gitlab-qa Test::Instance::Image ${RELEASE:=EE} -- --tag framework" 1 "2 examples, 1 failure"
|
164
|
+
- ./bin/expect_exit_code_and_text "bundle exec exe/gitlab-qa Test::Instance::Image ${RELEASE:=EE} -- --tag framework" 1 "2 examples, 1 failure"
|
164
165
|
extends:
|
165
166
|
- .test
|
166
167
|
- .high-capacity
|
@@ -169,8 +170,8 @@ ee:sanity-framework:
|
|
169
170
|
# The custom jobs are for manually running specific/alternative tests in MRs, so we don't report them in issues
|
170
171
|
ce:custom-parallel:
|
171
172
|
script:
|
172
|
-
- 'echo "Running: exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
|
173
|
-
- exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS
|
173
|
+
- 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
|
174
|
+
- bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS
|
174
175
|
extends:
|
175
176
|
- .test
|
176
177
|
- .high-capacity
|
@@ -181,8 +182,8 @@ ce:custom-parallel:
|
|
181
182
|
|
182
183
|
ee:custom-parallel:
|
183
184
|
script:
|
184
|
-
- 'echo "Running: exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
|
185
|
-
- exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS
|
185
|
+
- 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
|
186
|
+
- bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS
|
186
187
|
extends:
|
187
188
|
- .test
|
188
189
|
- .high-capacity
|
@@ -314,14 +315,14 @@ ee:repository_storage-quarantine:
|
|
314
315
|
# The Test::Omnibus::Image scenarios don't run the E2E tests so they don't need to report test results
|
315
316
|
ce:image:
|
316
317
|
script:
|
317
|
-
- exe/gitlab-qa Test::Omnibus::Image ${RELEASE:=CE}
|
318
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Image ${RELEASE:=CE}
|
318
319
|
extends:
|
319
320
|
- .test
|
320
321
|
- .ce-qa
|
321
322
|
|
322
323
|
ee:image:
|
323
324
|
script:
|
324
|
-
- exe/gitlab-qa Test::Omnibus::Image ${RELEASE:=EE}
|
325
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Image ${RELEASE:=EE}
|
325
326
|
extends:
|
326
327
|
- .test
|
327
328
|
- .ee-qa
|
@@ -330,7 +331,7 @@ ee:image:
|
|
330
331
|
# So instead we include the script here again, with two release variables
|
331
332
|
ce:update:
|
332
333
|
script:
|
333
|
-
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
334
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
334
335
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
335
336
|
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
336
337
|
- exit $test_run_exit_code
|
@@ -344,7 +345,7 @@ ce:update:
|
|
344
345
|
|
345
346
|
ce:update-quarantine:
|
346
347
|
script:
|
347
|
-
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
348
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
348
349
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
349
350
|
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
350
351
|
- exit $test_run_exit_code
|
@@ -357,7 +358,7 @@ ce:update-quarantine:
|
|
357
358
|
|
358
359
|
ee:update:
|
359
360
|
script:
|
360
|
-
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
361
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
361
362
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
362
363
|
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
363
364
|
- exit $test_run_exit_code
|
@@ -371,7 +372,7 @@ ee:update:
|
|
371
372
|
|
372
373
|
ee:update-quarantine:
|
373
374
|
script:
|
374
|
-
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
375
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
375
376
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
376
377
|
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
377
378
|
- exit $test_run_exit_code
|
@@ -385,7 +386,7 @@ ee:update-quarantine:
|
|
385
386
|
# The Test::Omnibus::Upgrade scenario isn't run on master (because it always uses the latest CE/EE image) so we don't report the test results in issues
|
386
387
|
ce:upgrade:
|
387
388
|
script:
|
388
|
-
- exe/gitlab-qa Test::Omnibus::Upgrade CE -- $RSPEC_REPORT_OPTS
|
389
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Upgrade CE -- $RSPEC_REPORT_OPTS
|
389
390
|
extends:
|
390
391
|
- .test
|
391
392
|
- .high-capacity
|
@@ -396,7 +397,7 @@ ce:upgrade:
|
|
396
397
|
|
397
398
|
ce:upgrade-quarantine:
|
398
399
|
script:
|
399
|
-
- exe/gitlab-qa Test::Omnibus::Upgrade CE -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS
|
400
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Upgrade CE -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS
|
400
401
|
extends:
|
401
402
|
- .test
|
402
403
|
- .high-capacity
|
@@ -406,7 +407,7 @@ ce:upgrade-quarantine:
|
|
406
407
|
|
407
408
|
ee-previous-to-ce:update:
|
408
409
|
script:
|
409
|
-
- exe/gitlab-qa Test::Omnibus::Update EE CE -- $RSPEC_REPORT_OPTS
|
410
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Update EE CE -- $RSPEC_REPORT_OPTS
|
410
411
|
extends:
|
411
412
|
- .test
|
412
413
|
- .high-capacity
|
@@ -415,7 +416,7 @@ ee-previous-to-ce:update:
|
|
415
416
|
|
416
417
|
ee-previous-to-ce:update-quarantine:
|
417
418
|
script:
|
418
|
-
- exe/gitlab-qa Test::Omnibus::Update EE CE -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS
|
419
|
+
- bundle exec exe/gitlab-qa Test::Omnibus::Update EE CE -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS
|
419
420
|
extends:
|
420
421
|
- .test
|
421
422
|
- .high-capacity
|
@@ -718,7 +719,7 @@ ce:object_storage:
|
|
718
719
|
- .ce-qa
|
719
720
|
- .rspec-report-opts
|
720
721
|
variables:
|
721
|
-
|
722
|
+
GITLAB_QA_OPTS: "--omnibus-config object_storage"
|
722
723
|
|
723
724
|
ce:object_storage-quarantine:
|
724
725
|
extends:
|
@@ -728,7 +729,7 @@ ce:object_storage-quarantine:
|
|
728
729
|
- .quarantine
|
729
730
|
- .rspec-report-opts
|
730
731
|
variables:
|
731
|
-
|
732
|
+
GITLAB_QA_OPTS: "--omnibus-config object_storage"
|
732
733
|
|
733
734
|
ee:object_storage:
|
734
735
|
extends:
|
@@ -737,7 +738,7 @@ ee:object_storage:
|
|
737
738
|
- .ee-qa
|
738
739
|
- .rspec-report-opts
|
739
740
|
variables:
|
740
|
-
|
741
|
+
GITLAB_QA_OPTS: "--omnibus-config object_storage"
|
741
742
|
|
742
743
|
ee:object_storage-quarantine:
|
743
744
|
extends:
|
@@ -747,7 +748,7 @@ ee:object_storage-quarantine:
|
|
747
748
|
- .quarantine
|
748
749
|
- .rspec-report-opts
|
749
750
|
variables:
|
750
|
-
|
751
|
+
GITLAB_QA_OPTS: "--omnibus-config object_storage"
|
751
752
|
|
752
753
|
ee:packages:
|
753
754
|
extends:
|
@@ -756,7 +757,7 @@ ee:packages:
|
|
756
757
|
- .ee-qa
|
757
758
|
- .rspec-report-opts
|
758
759
|
variables:
|
759
|
-
|
760
|
+
GITLAB_QA_OPTS: "--omnibus-config packages"
|
760
761
|
|
761
762
|
ee:packages-quarantine:
|
762
763
|
extends:
|
@@ -766,7 +767,7 @@ ee:packages-quarantine:
|
|
766
767
|
- .quarantine
|
767
768
|
- .rspec-report-opts
|
768
769
|
variables:
|
769
|
-
|
770
|
+
GITLAB_QA_OPTS: "--omnibus-config packages"
|
770
771
|
|
771
772
|
ce:actioncable:
|
772
773
|
extends:
|
@@ -988,8 +989,8 @@ ee:jira-quarantine:
|
|
988
989
|
staging:
|
989
990
|
script:
|
990
991
|
- unset EE_LICENSE
|
991
|
-
- 'echo "Running: exe/gitlab-qa Test::Instance::Staging ${RELEASE:=$DEFAULT_RELEASE} -- $QA_TESTS $QA_RSPEC_TAGS"'
|
992
|
-
- exe/gitlab-qa Test::Instance::Staging ${RELEASE:=$DEFAULT_RELEASE} -- $QA_TESTS $QA_RSPEC_TAGS
|
992
|
+
- 'echo "Running: bundle exec exe/gitlab-qa Test::Instance::Staging ${RELEASE:=$DEFAULT_RELEASE} -- $QA_TESTS $QA_RSPEC_TAGS"'
|
993
|
+
- bundle exec exe/gitlab-qa Test::Instance::Staging ${RELEASE:=$DEFAULT_RELEASE} -- $QA_TESTS $QA_RSPEC_TAGS
|
993
994
|
extends:
|
994
995
|
- .test
|
995
996
|
- .high-capacity
|
@@ -1010,7 +1011,7 @@ generate_test_session:
|
|
1010
1011
|
- REPORT_ISSUE_URL
|
1011
1012
|
script:
|
1012
1013
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
1013
|
-
- exe/gitlab-qa-report --generate-test-session "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASE_SESSIONS_PROJECT"
|
1014
|
+
- bundle exec exe/gitlab-qa-report --generate-test-session "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASE_SESSIONS_PROJECT"
|
1014
1015
|
|
1015
1016
|
relate_test_failures:
|
1016
1017
|
stage: report
|
@@ -1028,7 +1029,7 @@ relate_test_failures:
|
|
1028
1029
|
QA_FAILURES_REPORTER_OPTIONS: ""
|
1029
1030
|
script:
|
1030
1031
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
1031
|
-
- exe/gitlab-qa-report --relate-failure-issue "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_FAILURES_REPORTING_PROJECT" --max-diff-ratio "$QA_FAILURES_MAX_DIFF_RATIO" $QA_FAILURES_REPORTER_OPTIONS
|
1032
|
+
- bundle exec exe/gitlab-qa-report --relate-failure-issue "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_FAILURES_REPORTING_PROJECT" --max-diff-ratio "$QA_FAILURES_MAX_DIFF_RATIO" $QA_FAILURES_REPORTER_OPTIONS
|
1032
1033
|
|
1033
1034
|
.notify_upstream_commit:
|
1034
1035
|
stage: notify
|
@@ -0,0 +1,208 @@
|
|
1
|
+
# Configuring Omnibus
|
2
|
+
|
3
|
+
Omnibus will, by default, contain the configuration specified in `Gitlab::QA::Runtime::OmnibusConfigurations::Default`.
|
4
|
+
|
5
|
+
Omnibus can be configured from two places:
|
6
|
+
|
7
|
+
1. Within a custom `Scenario::Template`.
|
8
|
+
1. Represented as a `Gitlab::QA::Runtime::OmnibusConfiguration` class.
|
9
|
+
|
10
|
+
## Adding an Omnibus Configurator
|
11
|
+
|
12
|
+
All configurators are held within `Gitlab::QA::Runtime::OmnibusConfigurations` and represented as separate classes.
|
13
|
+
|
14
|
+
Notes:
|
15
|
+
|
16
|
+
- If it is required that more than one GitLab instance is configured,
|
17
|
+
you may skip adding an Omnibus Configurator. In this case, it should be handled by a separate `Scenario::Template`.
|
18
|
+
An example of this would be a Geo Primary and Secondary.
|
19
|
+
- All classes should be a type of `Runtime::OmnibusConfiguration`.
|
20
|
+
|
21
|
+
### Add the Configurator Class
|
22
|
+
|
23
|
+
Create a new file in `lib/gitlab/qa/runtime/omnibus_configurations` called `registry.rb`.
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
# frozen_string_literal: true
|
27
|
+
|
28
|
+
module Gitlab
|
29
|
+
module QA
|
30
|
+
module Runtime
|
31
|
+
module OmnibusConfigurations
|
32
|
+
class Registry < Default
|
33
|
+
def configuration
|
34
|
+
<<~OMNIBUS
|
35
|
+
gitlab_rails['registry_enabled'] = true
|
36
|
+
OMNIBUS
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
Notes:
|
46
|
+
|
47
|
+
- Refrain from adding unnecessary statement terminations (`;`).
|
48
|
+
|
49
|
+
### Prepare Sidecar Container
|
50
|
+
|
51
|
+
If the tests require an additional container to be spun up adjacent to GitLab, you may override the `prepare` method.
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
#=> lib/gitlab/qa/runtime/omnibus_configurations/registry.rb
|
55
|
+
|
56
|
+
# frozen_string_literal: true
|
57
|
+
|
58
|
+
module Gitlab
|
59
|
+
module QA
|
60
|
+
module Runtime
|
61
|
+
module OmnibusConfigurations
|
62
|
+
class Registry < Default
|
63
|
+
def configuration
|
64
|
+
<<~OMNIBUS
|
65
|
+
gitlab_rails['registry_enabled'] = true
|
66
|
+
OMNIBUS
|
67
|
+
end
|
68
|
+
|
69
|
+
def prepare
|
70
|
+
Component::Sidecar.new
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
```
|
78
|
+
|
79
|
+
Notes:
|
80
|
+
|
81
|
+
- `prepare` **must** return an instance of `Component::Base`.
|
82
|
+
- The sidecar container will be prepared before the test runs, and will run the tests after it is running.
|
83
|
+
- Extending the class from `Default` is only a nicety that adds a singleton method called `Registry.configuration` and returns the configuration.
|
84
|
+
It is recommended to extend from `Default`, but you may also extend from any other Omnibus Configuration class, including `Runtime::OmnibusConfiguration`.
|
85
|
+
|
86
|
+
## Running tests with Omnibus Configured
|
87
|
+
|
88
|
+
All Omnibus Configurators can be called by passing arguments into the `gitlab-qa` executable.
|
89
|
+
|
90
|
+
```shell
|
91
|
+
exe/gitlab-qa Test::Instance::Image EE --omnibus-config registry
|
92
|
+
```
|
93
|
+
|
94
|
+
Notes:
|
95
|
+
|
96
|
+
- `--omnibus-config registry` must match the name of the Omnibus Configurator Class name (`Runtime::OmnibusConfigurations::Registry`), but lowercase.
|
97
|
+
- If the Configurator Class name contains several words, the argument will be named the same, but snake cased. E.g. `--omnibus-config some_class` matches `SomeClass`, `--omnibus-config some_other_class` matches `SomeOtherClass`.
|
98
|
+
- The Omnibus GitLab Instance will have the configuration from `Default` and `Registry` (in that order) put into `/etc/gitlab/gitlab.rb` and GitLab QA will proceed to run the tests.
|
99
|
+
- If a specified Omnibus Configuration does not exist, GitLab QA will raise an error and fail immediately.
|
100
|
+
|
101
|
+
## Further reading
|
102
|
+
|
103
|
+
### Multiple Configurators
|
104
|
+
|
105
|
+
Multiple Configurators may be specified and the order will be preserved in which the arguments were passed.
|
106
|
+
|
107
|
+
E.g., given the arguments:
|
108
|
+
|
109
|
+
```
|
110
|
+
exe/gitlab-qa Test::Instance::Image EE --omnibus-config packages,registry
|
111
|
+
# or
|
112
|
+
exe/gitlab-qa Test::Instance::Image EE --omnibus-config packages --omnibus-config registry
|
113
|
+
```
|
114
|
+
|
115
|
+
Omnibus will be configured in the order they appear.
|
116
|
+
|
117
|
+
```ruby
|
118
|
+
# /etc/gitlab/gitlab.rb
|
119
|
+
#=> Runtime::OmnibusConfiguration::Default#configuration
|
120
|
+
#=> Runtime::OmnibusConfiguration::Packages#configuration
|
121
|
+
#=> Runtime::OmnibusConfiguration::Registry#configuration
|
122
|
+
```
|
123
|
+
|
124
|
+
The order is also preserved for Sidecar containers. If the `Packages` and `Registry` Configurators each prepare a sidecar container, they will be spun up in order from first to last.
|
125
|
+
|
126
|
+
### Adding one-off configurations
|
127
|
+
|
128
|
+
#### From a new Scenario::Template
|
129
|
+
|
130
|
+
If it is required to create a new `Scenario::Template`, you may add new Configurations to the respective GitLab Instances by invoking `omnibus_configuration#<<`
|
131
|
+
|
132
|
+
```ruby
|
133
|
+
# Geo example
|
134
|
+
|
135
|
+
Component::Gitlab.perform do |primary|
|
136
|
+
primary.omnibus_configuration << <<~OMNIBUS
|
137
|
+
geo_primary_role['enable'] = true
|
138
|
+
OMNIBUS
|
139
|
+
|
140
|
+
primary.instance do
|
141
|
+
Component::Gitlab.perform do |secondary|
|
142
|
+
secondary.omnibus_configuration << <<~OMNIBUS
|
143
|
+
geo_secondary_role['enable'] = true
|
144
|
+
OMNIBUS
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
```
|
149
|
+
|
150
|
+
Notes:
|
151
|
+
|
152
|
+
- The `primary` instance will be configured using the `Runtime::OmnibusConfigurations::Default` configuration, *then* `geo_primary_role['enable'] = true` will be affixed afterwards.
|
153
|
+
- The `secondary` instance will be configured using the `Runtime::OmnibusConfigurations::Default` configuration, *then* `geo_secondary_role['enable'] = true` will be affixed afterwards.
|
154
|
+
|
155
|
+
#### From Component::Gitlab
|
156
|
+
|
157
|
+
Any additional one-off configurations needing to be added may be directly appended to `@omnibus_configuration` as such:
|
158
|
+
|
159
|
+
```ruby
|
160
|
+
disable_animations = true
|
161
|
+
|
162
|
+
@omnibus_configuration << "gitlab_rails['gitlab_disable_animations'] = true" if disable_animations
|
163
|
+
```
|
164
|
+
|
165
|
+
This will add the specified configuration **after** what has already been specified beforehand (Configurators or Default configurations).
|
166
|
+
|
167
|
+
Note:
|
168
|
+
|
169
|
+
- If there is no issue appending this configuration to the **rest** of the GitLab Instances that might be spun up, you can add this
|
170
|
+
to the global Omnibus Configuration. E.g., use `Runtime::Scenario.omnibus_configuration << ...` instead of `@omnibus_configuration << ...`
|
171
|
+
|
172
|
+
#### Difference between Runtime::Scenario.omnibus_configuration and Gitlab#omnibus_configuration
|
173
|
+
|
174
|
+
Generally, while running GitLab QA, only one GitLab instance is necessary. `Runtime::Scenario.omnibus_configuration` contains all of the global
|
175
|
+
Omnibus configurations required for this one environment. This also contains the configuration for any other GitLab instance.
|
176
|
+
|
177
|
+
When multiple GitLab Instances are required, `@omnibus_configuration#<<` is preferred over `Runtime::Scenario.omnibus_configuration#<<` since the First Instance might require
|
178
|
+
one Omnibus configuration that might be unneccesary or Invalid for the Second Instance.
|
179
|
+
|
180
|
+
#### Load order and precedence
|
181
|
+
|
182
|
+
1. `Runtime::OmnibusConfigurations::Default`
|
183
|
+
1. `Runtime::OmnibusConfigurations::[A,B,...]` where `A` and `B` are Configurators specified through the positional arguments `--a --b`
|
184
|
+
1. Custom written `Scenario::Template` (such as `Test::Integation::Geo`)
|
185
|
+
1. `lib/gitlab/qa/component/gitlab.rb`
|
186
|
+
|
187
|
+
From top to bottom, configurations will be loaded and any configurations that are superceded, will take precedence over the one before it, and so on.
|
188
|
+
|
189
|
+
### Executing arbitrary shell commands within the GitLab Instance
|
190
|
+
|
191
|
+
Sometimes it's necessary to execute arbitrary commands within the GitLab instance before the tests start.
|
192
|
+
|
193
|
+
You may specify these commands by overriding the `exec_commands` method within the Configurator.
|
194
|
+
|
195
|
+
```ruby
|
196
|
+
class Registry < Default
|
197
|
+
def configuration
|
198
|
+
# configuration
|
199
|
+
end
|
200
|
+
|
201
|
+
def exec_commands
|
202
|
+
[
|
203
|
+
'cp /etc/gitlab/gitlab.rb /etc/gitlab/gitlab.bak.rb',
|
204
|
+
'rm /etc/gitlab/gitlab.bak.rb'
|
205
|
+
]
|
206
|
+
end
|
207
|
+
end
|
208
|
+
```
|