gitlab-qa 9.0.0 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fff29a089097412047c17a713152bab09d779b6b81632e2762501c2ea37eeed0
4
- data.tar.gz: 74c1d481f56ff0497e14cac6f235b282aa121031be0a77dab0a95bf0b490fdc3
3
+ metadata.gz: 6e4cbee0fd80c19ab1e9f2de614f85cb9139fa83a7a50e5aa81d6e81eddd8954
4
+ data.tar.gz: f31346c57dc8b0dd88bad1f528f76357782dd7f5f83216363d97a11cbefffe66
5
5
  SHA512:
6
- metadata.gz: b6d43ecfbe3359130fc691e1057113da2705f551d0149f5183192451b42c4608dd3daf6760a304c3ef710a0ed03e7a232e21ed6c93006fa873c55a37746f6d10
7
- data.tar.gz: 0f4eb1b06e9bcfd11c6782cba8da19c2ac489c4adf5f14b43e6e2be823bc8f71b2be04fa7b5a6eca4c018cf805a04e1794b4a3676f081c999852cbe4ff4a2d4b
6
+ metadata.gz: d305810dbc78df5704c7aa1f237db5844e9d17ab48c1d5e397d00a140569d8635578b715ab5928f8bf2e3bdf69fca63a72710ed3af3f01cdb733ad8b7676e89a
7
+ data.tar.gz: 96dfef1fdcc8808d54adb7d9db417905a2b8752e8cf4fdad2c6eb70e8cdf7c0a47e88f453fb2323bf59e2336e5f29db73fbbefb0a9049c291142c687d37b99bf
@@ -112,8 +112,13 @@ variables:
112
112
  - 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
113
113
  - bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
114
114
  - bundle exec exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
115
- - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
116
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-results "gitlab-qa-run-*/**/rspec-*.json" --test-case-project "$QA_TESTCASES_REPORTING_PROJECT" --results-issue-project "$QA_TEST_RESULTS_ISSUES_PROJECT" || true; fi
115
+ # Back-compatibility until we migrate all GITLAB_QA_PRODUCTION_ACCESS_TOKEN to QA_REPORT_RESULT_TOKEN.
116
+ # See https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/issues/175#note_1281196581 for context.
117
+ - export GITLAB_QA_ACCESS_TOKEN="${QA_REPORT_RESULT_TOKEN:-$GITLAB_QA_PRODUCTION_ACCESS_TOKEN}"
118
+ - |
119
+ if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then
120
+ exe/gitlab-qa-report --report-results "gitlab-qa-run-*/**/rspec-*.json" --test-case-project "$QA_TESTCASES_REPORTING_PROJECT" --results-issue-project "$QA_TEST_RESULTS_ISSUES_PROJECT" || true;
121
+ fi
117
122
  - exit $test_run_exit_code
118
123
 
119
124
  # For jobs that shouldn't report results in issues, e.g., manually run custom jobs
@@ -129,8 +134,13 @@ variables:
129
134
 
130
135
  - bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS_COMBINED -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
131
136
  - bundle exec exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
132
- - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
133
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-results "gitlab-qa-run-*/**/rspec-*.json" --test-case-project "$QA_TESTCASES_REPORTING_PROJECT" --results-issue-project "$QA_TEST_RESULTS_ISSUES_PROJECT" || true; fi
137
+ # Back-compatibility until we migrate all GITLAB_QA_PRODUCTION_ACCESS_TOKEN to QA_REPORT_RESULT_TOKEN.
138
+ # See https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/issues/175#note_1281196581 for context.
139
+ - export GITLAB_QA_ACCESS_TOKEN="${QA_REPORT_RESULT_TOKEN:-$GITLAB_QA_PRODUCTION_ACCESS_TOKEN}"
140
+ - |
141
+ if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then
142
+ exe/gitlab-qa-report --report-results "gitlab-qa-run-*/**/rspec-*.json" --test-case-project "$QA_TESTCASES_REPORTING_PROJECT" --results-issue-project "$QA_TEST_RESULTS_ISSUES_PROJECT" || true;
143
+ fi
134
144
  - exit $test_run_exit_code
135
145
 
136
146
  # The Test::Omnibus::Update scenarios require the release to be specified twice, which can't be done dynamically using the `variables` parameter
@@ -140,8 +150,13 @@ variables:
140
150
  - 'echo "Running: bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=$DEFAULT_RELEASE} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
141
151
  - bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=$DEFAULT_RELEASE} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
142
152
  - bundle exec exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
143
- - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
144
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-results "gitlab-qa-run-*/**/rspec-*.json" --test-case-project "$QA_TESTCASES_REPORTING_PROJECT" --results-issue-project "$QA_TEST_RESULTS_ISSUES_PROJECT" || true; fi
153
+ # Back-compatibility until we migrate all GITLAB_QA_PRODUCTION_ACCESS_TOKEN to QA_REPORT_RESULT_TOKEN.
154
+ # See https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/issues/175#note_1281196581 for context.
155
+ - export GITLAB_QA_ACCESS_TOKEN="${QA_REPORT_RESULT_TOKEN:-$GITLAB_QA_PRODUCTION_ACCESS_TOKEN}"
156
+ - |
157
+ if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then
158
+ exe/gitlab-qa-report --report-results "gitlab-qa-run-*/**/rspec-*.json" --test-case-project "$QA_TESTCASES_REPORTING_PROJECT" --results-issue-project "$QA_TEST_RESULTS_ISSUES_PROJECT" || true;
159
+ fi
145
160
  - exit $test_run_exit_code
146
161
 
147
162
  .high-capacity:
@@ -171,7 +186,9 @@ generate_test_session:
171
186
  paths:
172
187
  - REPORT_ISSUE_URL
173
188
  script:
174
- - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
189
+ # Back-compatibility until we migrate all GITLAB_QA_PRODUCTION_ACCESS_TOKEN to QA_TEST_SESSION_TOKEN.
190
+ # See https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/issues/175#note_1281240424 for context.
191
+ - export GITLAB_QA_ACCESS_TOKEN="${QA_TEST_SESSION_TOKEN:-$GITLAB_QA_PRODUCTION_ACCESS_TOKEN}"
175
192
  - bundle exec exe/gitlab-qa-report --generate-test-session "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASE_SESSIONS_PROJECT"
176
193
 
177
194
  relate_test_failures:
@@ -189,7 +206,9 @@ relate_test_failures:
189
206
  # The --dry-run can be set to modify the behavior of `exe/gitlab-qa-report --relate-failure-issue` without releasing a new gem version.
190
207
  QA_FAILURES_REPORTER_OPTIONS: ""
191
208
  script:
192
- - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
209
+ # Back-compatibility until we migrate all GITLAB_QA_PRODUCTION_ACCESS_TOKEN to QA_REPORT_RESULT_TOKEN.
210
+ # See https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/issues/175#note_1281196581 for context.
211
+ - export GITLAB_QA_ACCESS_TOKEN="${QA_REPORT_RESULT_TOKEN:-$GITLAB_QA_PRODUCTION_ACCESS_TOKEN}"
193
212
  - 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
194
213
 
195
214
  .notify_slack:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (9.0.0)
4
+ gitlab-qa (9.1.0)
5
5
  activesupport (~> 6.1)
6
6
  gitlab (~> 4.18.0)
7
7
  http (~> 5.0)
@@ -36,6 +36,44 @@ Note: The `gem-release` job uses:
36
36
 
37
37
  ## Post-release maintenance
38
38
 
39
- Please note that `gitlab-qa` version in `gitlab-org/gitlab` project will be updated automatically by [renovate-gitlab-bot](https://gitlab.com/gitlab-org/frontend/renovate-gitlab-bot). However, for live environment pipelines we need to specify the version in `pipeline-common` project manually. Remember to open an MR updating `GITLAB_QA_VERSION` value in [base.gitlab-ci.yml](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/base.gitlab-ci.yml#L4) shortly after the new version is released.
39
+ Please note that `gitlab-qa` version in `gitlab-org/gitlab` project will be updated automatically by [renovate-gitlab-bot](https://gitlab.com/gitlab-org/frontend/renovate-gitlab-bot). However, for live environment pipelines we need to specify the version in [pipeline-common](https://gitlab.com/gitlab-org/quality/pipeline-common) project manually. Remember to open an MR updating `GITLAB_QA_VERSION` value in [base.gitlab-ci.yml](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/base.gitlab-ci.yml#L4) shortly after the new version is released.
40
+
41
+ ## Flowchart
42
+
43
+ The flowchart below outlines a high-level overview of the `gitlab-qa` release process, along with post-release maintenance items required
44
+ to update the `gitlab-qa` version for our pipelines.
45
+
46
+ #### Key:
47
+ - Rectangles represent manual actions
48
+ - Hexagons represent automated actions
49
+
50
+ ```mermaid
51
+ flowchart LR
52
+ subgraph gitlab-qa
53
+ A[Update lib/gitlab/qa/version.rb] --> B[Update Gemfile.lock]
54
+ B --> C[Push branch]
55
+ C --> D[Open MR with release template]
56
+ D --> E[Review and merge]
57
+ E --> F{{Tag created by gem-release job}}
58
+ F --> G[Update tag release notes]
59
+ end
60
+ subgraph gitlab-org/gitlab
61
+ H{{gitlab-renovate-bot checks for new gitlab-qa version}} --> I{{GitLab Dependency Bot opens MR}}
62
+ I --> J[Review and merge]
63
+ J --> K{{gitlab-qa version updated}}
64
+ end
65
+ subgraph pipeline-common
66
+ L[Update GITLAB_QA_VERSION in ci/base.gitlab-ci.yml] --> M[Push branch]
67
+ M --> N[Open MR]
68
+ N --> O[Review and merge]
69
+ O --> P[Follow pipeline-common release process]
70
+ end
71
+ gitlab-qa --> gitlab-org/gitlab & pipeline-common
72
+
73
+ classDef linkNode color:blue,text-decoration:underline;
74
+ class P linkNode;
75
+
76
+ click P "https://gitlab.com/gitlab-org/quality/pipeline-common/-/tree/master#release-process"
77
+ ```
40
78
 
41
79
  [`lib/gitlab/qa/version.rb`]: https://gitlab.com/gitlab-org/gitlab-qa/blob/master/lib/gitlab/qa/version.rb#L3
@@ -55,7 +55,7 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
55
55
  | `GITLAB_ADMIN_USERNAME` |- | Admin username to use when adding a license. | No|
56
56
  | `GITLAB_ADMIN_PASSWORD` |- | Admin password to use when adding a license. | No|
57
57
  | `GITLAB_SANDBOX_NAME` | `gitlab-qa-sandbox` | The sandbox group name the test suite is going to use. | No|
58
- | `GITLAB_QA_ACCESS_TOKEN`|- | A valid personal access token with the `api` scope. This is used for API access during tests, and is used in the version that staging is currently running. An existing token that is valid on [`Test::Instance::Staging`](#testinstancestaging) scenario to retrieve the staging can be found in the shared 1Password vault. |No|
58
+ | `GITLAB_QA_ACCESS_TOKEN`|- | A valid personal access token with the `api` scope. This allows tests to use the API without having to create a new personal access token first. It is also used to check what version [deployed environments](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/dot-com/README.md#projects) are currently running. Existing tokens for each environment can be found in the shared 1Password vault. |No|
59
59
  | `GITLAB_QA_ADMIN_ACCESS_TOKEN` |- | A valid personal access token with the `api` scope from a user with admin access. Used for API access as an admin during tests. | No|
60
60
  | `GITLAB_QA_CONTAINER_REGISTRY_ACCESS_TOKEN` | - | A valid personal access token with the `read_registry` scope. Used to [access the container registry on `registry.gitlab.com` when tests run in a CI job that _is not_ triggered via another pipeline](https://gitlab.com/gitlab-org/gitlab-qa/-/blob/364addb83e7b136ff0f9d8719ca9553d290aa9ab/lib/gitlab/qa/release.rb#L152). For example, if you manually run a [new Staging pipeline](https://ops.gitlab.net/gitlab-org/quality/staging/-/pipelines/new), this token will be used. | No |
61
61
  | `EE_LICENSE` |- | Enterprise Edition license. | No|
@@ -1027,25 +1027,21 @@ These variables are available at 1Password QA Vault.
1027
1027
 
1028
1028
  ### `Test::Integration::RegistryTLS EE`
1029
1029
 
1030
- It requires GitLab's TLS certificate found on the [`tls_certificates`](https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/tls_certificates/gitlab/gitlab.test.crt) folder
1031
-
1032
- ```shell
1033
- $ export GITLAB_TLS_CERTIFICATE=$(cat /path/to/certificate.crt)
1034
- ```
1030
+ It uses GitLab's TLS certificate found in the [`tls_certificates`](https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/tls_certificates/gitlab/gitlab.test.crt) folder.
1035
1031
 
1036
1032
  To run a scenario with an insecure registry enabled use `Test::Integration::Registry EE` instead (it does not require the above certificate).
1037
1033
 
1038
- ### Test::Integration::RegistryTLS EE --omnibus-config object_storage
1034
+ ### `Test::Integration::RegistryTLS EE --omnibus-config object_storage`
1039
1035
 
1040
1036
  This scenario is a composition of two orchestrated scenarios. It tests the container registry (TLS-enabled) integrated with an object storage backend.
1041
1037
 
1042
1038
  An example would be to pass the option `--omnibus-config object_storage_aws` and the registry will be pulling and pushing images using AWS Cloud Storage as a storage backend.
1043
1039
 
1044
1040
  ```shell
1045
- GITLAB_TLS_CERTIFICATE=$(cat /path/to/certificate.crt) gitlab-qa Test::Integration::RegistryTLS EE --omnibus-config object_storage_aws
1041
+ gitlab-qa Test::Integration::RegistryTLS EE --omnibus-config object_storage_aws
1046
1042
  ```
1047
1043
 
1048
- ### Test::Instance::Image EE --omnibus-config decomposition_single_db
1044
+ ### `Test::Instance::Image EE --omnibus-config decomposition_single_db`
1049
1045
 
1050
1046
  This scenario is to run tests against a GitLab instance with a [decomposed database](https://gitlab.com/groups/gitlab-org/-/epics/6160) using a single database:
1051
1047
 
@@ -1053,7 +1049,7 @@ This scenario is to run tests against a GitLab instance with a [decomposed datab
1053
1049
  gitlab-qa Test::Instance::Image EE --omnibus-config decomposition_single_db
1054
1050
  ```
1055
1051
 
1056
- ### Test::Instance::Image EE --omnibus-config decomposition_multiple_db
1052
+ ### `Test::Instance::Image EE --omnibus-config decomposition_multiple_db`
1057
1053
 
1058
1054
  This scenario is to run tests against a GitLab instance with a [decomposed database](https://gitlab.com/groups/gitlab-org/-/epics/6160) using multiple databases:
1059
1055
 
@@ -4,7 +4,7 @@ module Gitlab
4
4
  module QA
5
5
  module Component
6
6
  class Preprod < Staging
7
- ADDRESS = 'https://pre.gitlab.com'
7
+ ADDRESS = Runtime::Env.preprod_url
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module Gitlab
4
4
  module QA
5
5
  module Component
6
6
  class Production < Staging
7
- ADDRESS = 'https://gitlab.com'
7
+ ADDRESS = Runtime::Env.production_url
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module Gitlab
4
4
  module QA
5
5
  module Component
6
6
  class Release < Staging
7
- ADDRESS = 'https://release.gitlab.net'
7
+ ADDRESS = Runtime::Env.release_url
8
8
  end
9
9
  end
10
10
  end
@@ -8,8 +8,8 @@ module Gitlab
8
8
  module QA
9
9
  module Component
10
10
  class Staging
11
- ADDRESS = 'https://staging.gitlab.com'
12
- GEO_SECONDARY_ADDRESS = 'https://geo.staging.gitlab.com'
11
+ ADDRESS = Runtime::Env.staging_url
12
+ GEO_SECONDARY_ADDRESS = Runtime::Env.geo_staging_url
13
13
 
14
14
  def self.release
15
15
  QA::Release.new(image)
@@ -4,8 +4,8 @@ module Gitlab
4
4
  module QA
5
5
  module Component
6
6
  class StagingRef < Staging
7
- ADDRESS = 'https://staging-ref.gitlab.com'
8
- GEO_SECONDARY_ADDRESS = 'https://geo.staging-ref.gitlab.com'
7
+ ADDRESS = Runtime::Env.staging_ref_url
8
+ GEO_SECONDARY_ADDRESS = Runtime::Env.geo_staging_ref_url
9
9
  end
10
10
  end
11
11
  end
@@ -373,6 +373,34 @@ module Gitlab
373
373
  env_var_value_if_defined('CUSTOMER_PORTAL_URL') || 'https://customers.staging.gitlab.com'
374
374
  end
375
375
 
376
+ def geo_staging_url
377
+ env_var_value_if_defined('GEO_STAGING_URL') || 'https://geo.staging.gitlab.com'
378
+ end
379
+
380
+ def staging_url
381
+ env_var_value_if_defined('STAGING_URL') || 'https://staging.gitlab.com'
382
+ end
383
+
384
+ def staging_ref_url
385
+ env_var_value_if_defined('STAGING_REF_URL') || 'https://staging-ref.gitlab.com'
386
+ end
387
+
388
+ def geo_staging_ref_url
389
+ env_var_value_if_defined('GEO_STAGING_REF_URL') || 'https://geo.staging-ref.gitlab.com'
390
+ end
391
+
392
+ def release_url
393
+ env_var_value_if_defined('RELEASE_URL') || 'https://release.gitlab.net'
394
+ end
395
+
396
+ def production_url
397
+ env_var_value_if_defined('PRODUCTION_URL') || 'https://gitlab.com'
398
+ end
399
+
400
+ def preprod_url
401
+ env_var_value_if_defined('PREPROD_URL') || 'https://pre.gitlab.com'
402
+ end
403
+
376
404
  def allow_separate_ci_database
377
405
  enabled?(env_var_value_if_defined('GITLAB_ALLOW_SEPARATE_CI_DATABASE'), default: false)
378
406
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '9.0.0'
5
+ VERSION = '9.1.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-03 00:00:00.000000000 Z
11
+ date: 2023-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control