gitlab-qa 6.23.0 → 7.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.gitlab-ci.yml +31 -30
  3. data/docs/configuring_omnibus.md +208 -0
  4. data/docs/what_tests_can_be_run.md +12 -8
  5. data/gitlab-qa.gemspec +6 -4
  6. data/lib/gitlab/qa.rb +7 -0
  7. data/lib/gitlab/qa/component/base.rb +2 -2
  8. data/lib/gitlab/qa/component/elasticsearch.rb +1 -1
  9. data/lib/gitlab/qa/component/gitlab.rb +21 -24
  10. data/lib/gitlab/qa/component/internet_tunnel.rb +4 -1
  11. data/lib/gitlab/qa/component/jira.rb +1 -1
  12. data/lib/gitlab/qa/component/ldap.rb +1 -1
  13. data/lib/gitlab/qa/component/mail_hog.rb +1 -1
  14. data/lib/gitlab/qa/component/minio.rb +3 -11
  15. data/lib/gitlab/qa/component/postgresql.rb +1 -1
  16. data/lib/gitlab/qa/component/saml.rb +1 -1
  17. data/lib/gitlab/qa/component/specs.rb +2 -2
  18. data/lib/gitlab/qa/docker/engine.rb +28 -3
  19. data/lib/gitlab/qa/runner.rb +52 -5
  20. data/lib/gitlab/qa/runtime/env.rb +1 -0
  21. data/lib/gitlab/qa/runtime/omnibus_configuration.rb +80 -0
  22. data/lib/gitlab/qa/runtime/omnibus_configurations/default.rb +25 -0
  23. data/lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb +48 -0
  24. data/lib/gitlab/qa/runtime/omnibus_configurations/packages.rb +17 -0
  25. data/lib/gitlab/qa/scenario/cli_commands.rb +3 -3
  26. data/lib/gitlab/qa/scenario/test/instance/relative_url.rb +1 -3
  27. data/lib/gitlab/qa/scenario/test/instance/repository_storage.rb +1 -1
  28. data/lib/gitlab/qa/scenario/test/integration/actioncable.rb +1 -3
  29. data/lib/gitlab/qa/scenario/test/integration/geo.rb +4 -5
  30. data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +4 -5
  31. data/lib/gitlab/qa/scenario/test/integration/group_saml.rb +1 -1
  32. data/lib/gitlab/qa/scenario/test/integration/instance_saml.rb +1 -1
  33. data/lib/gitlab/qa/scenario/test/integration/kubernetes.rb +1 -1
  34. data/lib/gitlab/qa/scenario/test/integration/ldap.rb +1 -4
  35. data/lib/gitlab/qa/scenario/test/integration/ldap_no_server.rb +1 -1
  36. data/lib/gitlab/qa/scenario/test/integration/ldap_no_tls.rb +1 -1
  37. data/lib/gitlab/qa/scenario/test/integration/ldap_tls.rb +1 -1
  38. data/lib/gitlab/qa/scenario/test/integration/mattermost.rb +1 -1
  39. data/lib/gitlab/qa/scenario/test/integration/mtls.rb +2 -2
  40. data/lib/gitlab/qa/scenario/test/integration/smtp.rb +1 -1
  41. data/lib/gitlab/qa/scenario/test/integration/ssh_tunnel.rb +1 -1
  42. data/lib/gitlab/qa/version.rb +1 -1
  43. metadata +12 -9
  44. data/lib/gitlab/qa/scenario/test/integration/object_storage.rb +0 -64
  45. 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: be38f6268c3a91ecdeee390c040f658e07194eb1e3d5f99694d50c68540a5461
4
- data.tar.gz: bb9fd66f54e18792a9d5a8bb445fefe7cc63d824ef445b61b60f2c7ef378422f
3
+ metadata.gz: 94fd458767a2190eeba5094962dca4d1eb9d1ec2769c3ed6815e0750c4d95d3e
4
+ data.tar.gz: 38f5336f05c2bb558c7099d410ceea33cf1f0ea254b978e18c32c96f5e7fdc62
5
5
  SHA512:
6
- metadata.gz: 54f0d06a51b27c5e4ea0c1352ca01f634d8e7bc00475345c87650beaf783e7f4dcc4cc53828d54e75b01ada167f002c1a51451147afac400a27ae9132008ee30
7
- data.tar.gz: a651ecb24eb49d6e3997c5c6abfef1048900f760d81374e35b9104b05b25210f94c0ecf4de65e5e79c710ca7552153da7aab36e765b5e1acd9c829cf6feb36c1
6
+ metadata.gz: 8a146c677f1b78dde5755e9d0d0445c100f4264d2e862dc98c75c8bf7265b84df9167565702c88556877c48747eb18b677a6deb4ff4489bf5e05a54c0fb0bd5c
7
+ data.tar.gz: e386131381bdfc7e1f7c4f9644586279af44e8996c0f4fc23a70559d821f127856e56ec37391407346982058b9377f78979f269e2d0d49b49d074845fad7c37a
data/.gitlab-ci.yml CHANGED
@@ -18,7 +18,8 @@ default:
18
18
  - vendor/ruby
19
19
  before_script:
20
20
  - bundle version
21
- - bundle install --jobs=$(nproc) --path=vendor --retry=3 --quiet && bundle check
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
- QA_SCENARIO: "Test::Integration::ObjectStorage"
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
- QA_SCENARIO: "Test::Integration::ObjectStorage"
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
- QA_SCENARIO: "Test::Integration::ObjectStorage"
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
- QA_SCENARIO: "Test::Integration::ObjectStorage"
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
- QA_SCENARIO: "Test::Integration::Packages"
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
- QA_SCENARIO: "Test::Integration::Packages"
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
+ ```
@@ -534,6 +534,18 @@ $ gitlab-qa Test::Integration::Mattermost EE
534
534
 
535
535
  ### `Test::Integration::Packages CE|EE|<full image address>`
536
536
 
537
+ **Note: This Scenario no longer exists. See https://gitlab.com/gitlab-org/gitlab-qa/-/merge_requests/662**
538
+
539
+ To run Packages tests, you may [configure Omnibus](configuring_omnibus.md) to use the [Packages](https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/lib/gitlab/qa/runtime/omnibus_configurations/packages.rb) configurator.
540
+
541
+ Example:
542
+
543
+ ```
544
+ $ export EE_LICENSE=$(cat /path/to/Geo.gitlab_license)
545
+
546
+ $ gitlab-qa Test::Instance::Image EE --omnibus-config packages
547
+ ```
548
+
537
549
  This tests the GitLab Package Registry feature by setting
538
550
  `gitlab_rails['packages_enabled'] = true` in the Omnibus configuration
539
551
  before starting the GitLab container.
@@ -547,14 +559,6 @@ which runs only the tests with `:packages` metadata.
547
559
 
548
560
  - `EE_LICENSE`: A valid EE license.
549
561
 
550
- Example:
551
-
552
- ```
553
- $ export EE_LICENSE=$(cat /path/to/Geo.gitlab_license)
554
-
555
- $ gitlab-qa Test::Integration::Packages EE
556
- ```
557
-
558
562
  ### `Test::Integration::Praefect CE|EE|<full image address>`
559
563
 
560
564
  This tests [Praefect](https://docs.gitlab.com/ee/administration/gitaly/praefect.html),