gitlab-qa 14.10.0 → 14.11.0
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 +3 -5
- data/.rubocop_todo.yml +0 -1
- data/Gemfile.lock +1 -1
- data/docs/what_tests_can_be_run.md +5 -21
- data/lib/gitlab/qa/component/chaos.rb +1 -1
- data/lib/gitlab/qa/component/gitaly_cluster.rb +1 -1
- data/lib/gitlab/qa/runner.rb +0 -13
- data/lib/gitlab/qa/runtime/env.rb +124 -119
- data/lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb +1 -1
- data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +1 -1
- data/lib/gitlab/qa/scenario/test/instance/image.rb +1 -1
- data/lib/gitlab/qa/scenario/test/instance/relative_url.rb +1 -1
- data/lib/gitlab/qa/scenario/test/instance/repository_storage.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/ai_gateway_base.rb +2 -1
- data/lib/gitlab/qa/scenario/test/integration/client_ssl.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/elasticsearch.rb +2 -2
- data/lib/gitlab/qa/scenario/test/integration/gitlab_pages.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/import.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/integrations.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/jira.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/ldap.rb +3 -3
- data/lib/gitlab/qa/scenario/test/integration/mattermost.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/metrics.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/opensearch.rb +2 -2
- data/lib/gitlab/qa/scenario/test/integration/registry.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/registry_tls.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/registry_with_cdn.rb +2 -2
- data/lib/gitlab/qa/scenario/test/integration/saml.rb +3 -3
- data/lib/gitlab/qa/scenario/test/integration/service_ping_disabled.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/smtp.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/suggested_reviewer.rb +1 -1
- data/lib/gitlab/qa/scenario/test/omnibus/update_from_previous.rb +1 -1
- data/lib/gitlab/qa/support/gitlab_upgrade_path.rb +2 -2
- data/lib/gitlab/qa/version.rb +1 -1
- data/rubocop/cop/gitlab/dangerous_interpolation.rb +0 -1
- metadata +2 -5
- data/lib/gitlab/qa/component/telegraf.rb +0 -175
- data/lib/gitlab/qa/scenario/test/instance/staging_geo.rb +0 -32
- data/lib/gitlab/qa/scenario/test/sanity/version.rb +0 -93
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f1cb43d060925e3dd20830d8412563a94fca6fb8ad0636de7da5176b984c4e5
|
4
|
+
data.tar.gz: c6096e3712816f0c5667208d219f7e25ce125a869dc4c8b689e89e7c8c85242e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 526945385fb2c815c5cc5b7d17b7327523f099f0f08d123185041cde9142231664c62d253b96ae5262dc9519420cf79aa924750313e07af2c822c1bae528509d
|
7
|
+
data.tar.gz: 2782d95be4f96c1a67a1696b96bb0e8cdaa84fc0a273ac671c39925615b884c6f7e2645df4a3e95d5e74b812e82ad00af0a0a741bf4d144536764fa1d5b16a60
|
data/.gitlab-ci.yml
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
include:
|
11
11
|
- component: gitlab.com/gitlab-org/components/danger-review/danger-review@~latest
|
12
12
|
inputs:
|
13
|
-
job_image: "${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}
|
13
|
+
job_image: "${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}"
|
14
14
|
- component: gitlab.com/gitlab-org/components/gem-release/gem-release@~latest
|
15
15
|
|
16
16
|
stages:
|
@@ -20,7 +20,7 @@ stages:
|
|
20
20
|
- deploy
|
21
21
|
|
22
22
|
default:
|
23
|
-
image: ${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}
|
23
|
+
image: ${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}
|
24
24
|
tags:
|
25
25
|
- gitlab-org
|
26
26
|
cache:
|
@@ -43,8 +43,7 @@ workflow:
|
|
43
43
|
variables:
|
44
44
|
DEBIAN_VERSION: bookworm
|
45
45
|
DOCKER_VERSION: "24.0.5"
|
46
|
-
|
47
|
-
RUBY_VERSION: "3.1"
|
46
|
+
RUBY_VERSION: "3.1.5"
|
48
47
|
BUNDLE_PATH: vendor
|
49
48
|
BUNDLE_SILENCE_ROOT_WARNING: "true"
|
50
49
|
BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true"
|
@@ -145,7 +144,6 @@ package-and-test:
|
|
145
144
|
- RUBY_VERSION
|
146
145
|
- DEBIAN_VERSION
|
147
146
|
- DOCKER_VERSION
|
148
|
-
- BUNDLER_VERSION
|
149
147
|
trigger:
|
150
148
|
strategy: depend
|
151
149
|
forward:
|
data/.rubocop_todo.yml
CHANGED
@@ -55,7 +55,6 @@ Metrics/AbcSize:
|
|
55
55
|
- 'lib/gitlab/qa/scenario/test/integration/registry_with_cdn.rb'
|
56
56
|
- 'lib/gitlab/qa/scenario/test/integration/smtp.rb'
|
57
57
|
- 'lib/gitlab/qa/scenario/test/integration/suggested_reviewer.rb'
|
58
|
-
- 'lib/gitlab/qa/scenario/test/sanity/version.rb'
|
59
58
|
|
60
59
|
# Offense count: 2
|
61
60
|
# Configuration parameters: CheckIdentifiers, CheckConstants, CheckVariables, CheckStrings, CheckSymbols, CheckComments, CheckFilepaths, FlaggedTerms.
|
data/Gemfile.lock
CHANGED
@@ -63,6 +63,7 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
|
|
63
63
|
| `QA_EE_ACTIVATION_CODE` |- | Cloud activation code to enable Enterprise Edition features. | No|
|
64
64
|
| `QA_ARTIFACTS_DIR` |`/tmp/gitlab-qa`| Path to a directory where artifacts (logs and screenshots) for failing tests will be saved. | No|
|
65
65
|
| `DOCKER_HOST` |`http://localhost`| Docker host to run tests against. | No|
|
66
|
+
| `QA_DOCKER_NETWORK` | `test` | Name of the Docker network that is created to allow connectivity between GitLab and other containers. | No |
|
66
67
|
| `WEBDRIVER_HEADLESS` |- | When running locally, set to `false` to allow Chrome tests to be visible - watch your tests being run. | No|
|
67
68
|
| `CHROME_DISABLE_DEV_SHM` | `false` | Set to `true` to disable `/dev/shm` usage in Chrome on Linux. | No|
|
68
69
|
| `QA_ADDITIONAL_REPOSITORY_STORAGE` |- | The name of additional, non-default storage to be used with tests tagged `repository_storage`, run via the `Test::Instance::RepositoryStorage` scenario. Note: Admin access is required to change repository storage. | No|
|
@@ -333,7 +334,7 @@ Scenario verifies upgrade from previous (major|minor) version to current release
|
|
333
334
|
- Deploys previous (major|minor) version and runs Smoke test suite
|
334
335
|
to populate data in database before upgrade
|
335
336
|
- Generates upgrade path following current GitLab recommendations
|
336
|
-
from ['gitlab
|
337
|
+
from ['gitlab.com/gitlab-org/gitlab'](https://gitlab.com/gitlab-org/gitlab/-/raw/master/config/upgrade_path.yml) project
|
337
338
|
- Gradually upgrades GitLab instances to `<current_version>`
|
338
339
|
associated with provided `<full image address>` and runs tests against it
|
339
340
|
|
@@ -883,9 +884,9 @@ $ export GITLAB_PASSWORD="$GITLAB_QA_PASSWORD"
|
|
883
884
|
$ gitlab-qa Test::Instance::StagingRef
|
884
885
|
```
|
885
886
|
|
886
|
-
### `Test::Instance::
|
887
|
+
### `Test::Instance::StagingRefGeo`
|
887
888
|
|
888
|
-
This scenario tests that the Geo staging deployment (with [`staging.gitlab.com`](https://staging.gitlab.com) as the primary site and [`geo.staging.gitlab.com`](https://geo.staging.gitlab.com) as the secondary site) works as expected by running tests tagged `:geo` against it. This is done by spinning up a GitLab QA (`gitlab/gitlab-qa`) container and running the `QA::EE::Scenario::Test::Geo` scenario. Note that the Geo setup steps in the `QA::EE::Scenario::Test::Geo` scenario are skipped when testing a live Geo deployment.
|
889
|
+
This scenario tests that the Geo staging deployment (with [`staging-ref.gitlab.com`](https://staging-ref.gitlab.com) as the primary site and [`geo.staging-ref.gitlab.com`](https://geo.staging-ref.gitlab.com) as the secondary site) works as expected by running tests tagged `:geo` against it. This is done by spinning up a GitLab QA (`gitlab/gitlab-qa`) container and running the `QA::EE::Scenario::Test::Geo` scenario. Note that the Geo setup steps in the `QA::EE::Scenario::Test::Geo` scenario are skipped when testing a live Geo deployment.
|
889
890
|
|
890
891
|
**Required user properties:**
|
891
892
|
|
@@ -907,23 +908,6 @@ This scenario tests that the Geo staging deployment (with [`staging.gitlab.com`]
|
|
907
908
|
If the variable isn't present, the QA image from Docker Hub will be used.
|
908
909
|
This can be found in the shared 1Password vault.
|
909
910
|
|
910
|
-
Example:
|
911
|
-
|
912
|
-
```shell
|
913
|
-
$ export GITLAB_QA_ACCESS_TOKEN=your_api_access_token
|
914
|
-
$ export GITLAB_QA_DEV_ACCESS_TOKEN=your_dev_registry_access_token
|
915
|
-
$ export GITLAB_USERNAME="gitlab-qa"
|
916
|
-
$ export GITLAB_PASSWORD="$GITLAB_QA_PASSWORD"
|
917
|
-
|
918
|
-
$ gitlab-qa Test::Instance::StagingGeo
|
919
|
-
```
|
920
|
-
|
921
|
-
### `Test::Instance::StagingRefGeo`
|
922
|
-
|
923
|
-
This scenario tests that the Geo staging deployment (with [`staging-ref.gitlab.com`](https://staging-ref.gitlab.com) as the primary site and [`geo.staging-ref.gitlab.com`](https://geo.staging-ref.gitlab.com) as the secondary site) works as expected by running tests tagged `:geo` against it. This is done by spinning up a GitLab QA (`gitlab/gitlab-qa`) container and running the `QA::EE::Scenario::Test::Geo` scenario. Note that the Geo setup steps in the `QA::EE::Scenario::Test::Geo` scenario are skipped when testing a live Geo deployment.
|
924
|
-
|
925
|
-
Scenario requirements are the same as [`Test::Instance::StagingGeo`](#testinstancestaginggeo) described above.
|
926
|
-
|
927
911
|
```shell
|
928
912
|
$ export GITLAB_QA_ACCESS_TOKEN=your_api_access_token
|
929
913
|
$ export GITLAB_QA_DEV_ACCESS_TOKEN=your_dev_registry_access_token
|
@@ -1034,7 +1018,7 @@ These tests verify features related to multiple repository storages.
|
|
1034
1018
|
Example:
|
1035
1019
|
|
1036
1020
|
```shell
|
1037
|
-
$ export QA_ADDITIONAL_REPOSITORY_STORAGE=secondary
|
1021
|
+
$ export QA_ADDITIONAL_REPOSITORY_STORAGE=secondary
|
1038
1022
|
$ export QA_GITALY_NON_CLUSTER_STORAGE=gitaly
|
1039
1023
|
$ export QA_PRAEFECT_REPOSITORY_STORAGE=praefect
|
1040
1024
|
|
@@ -16,7 +16,7 @@ module Gitlab
|
|
16
16
|
|
17
17
|
def initialize(params = {}) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
18
18
|
@gitlab_name = params[:gitlab_name] || 'gitlab-gitaly-cluster'
|
19
|
-
@network = params[:network] ||
|
19
|
+
@network = params[:network] || Runtime::Env.docker_network
|
20
20
|
@airgapped_network = params[:airgapped_network] || false
|
21
21
|
|
22
22
|
@praefect_node_name = params[:praefect_node_name] || 'praefect'
|
data/lib/gitlab/qa/runner.rb
CHANGED
@@ -93,7 +93,6 @@ module Gitlab
|
|
93
93
|
scenario = Scenario.const_get(args.shift)
|
94
94
|
|
95
95
|
load_omnibus_configurations
|
96
|
-
load_telegraf(scenario)
|
97
96
|
|
98
97
|
begin
|
99
98
|
@active_configurators.compact.each do |configurator|
|
@@ -129,18 +128,6 @@ module Gitlab
|
|
129
128
|
end.compact
|
130
129
|
end
|
131
130
|
|
132
|
-
# Start telegraf agent for metrics collection
|
133
|
-
#
|
134
|
-
# Do not load when running against external instance
|
135
|
-
#
|
136
|
-
# @param [Class] scenario
|
137
|
-
# @return [void]
|
138
|
-
def self.load_telegraf(scenario)
|
139
|
-
return if scenario <= Scenario::Test::Instance::DeploymentBase || scenario == Scenario::Test::Instance::Any
|
140
|
-
|
141
|
-
@active_configurators << Component::Telegraf.new
|
142
|
-
end
|
143
|
-
|
144
131
|
def self.load_omnibus_configurations
|
145
132
|
# OmnibusConfiguration::Test => --test
|
146
133
|
# OmnibusConfiguration::HelloThere => --hello_there
|
@@ -17,156 +17,156 @@ module Gitlab
|
|
17
17
|
# Any new key-value pairs should also be added to the hash at /rubocop/cop/gitlab/dangerous_interpolation.rb
|
18
18
|
# to prevent Rubocop errors.
|
19
19
|
ENV_VARIABLES = {
|
20
|
-
'QA_IMAGE' => :qa_image,
|
21
|
-
'QA_REMOTE_GRID' => :remote_grid,
|
22
|
-
'QA_REMOTE_GRID_USERNAME' => :remote_grid_username,
|
23
|
-
'QA_REMOTE_GRID_ACCESS_KEY' => :remote_grid_access_key,
|
24
|
-
'QA_REMOTE_GRID_PROTOCOL' => :remote_grid_protocol,
|
25
|
-
'QA_REMOTE_MOBILE_DEVICE_NAME' => :remote_mobile_device_name,
|
26
|
-
'QA_REMOTE_TUNNEL_ID' => :remote_tunnel_id,
|
27
|
-
'QA_BROWSER' => :browser,
|
28
|
-
'QA_SELENOID_BROWSER_VERSION' => :selenoid_browser_version,
|
29
|
-
'QA_RECORD_VIDEO' => :record_video,
|
30
|
-
'QA_LAYOUT' => :layout,
|
31
|
-
'QA_VIDEO_RECORDER_IMAGE' => :video_recorder_image,
|
32
|
-
'QA_VIDEO_RECORDER_VERSION' => :video_recorder_version,
|
33
|
-
'QA_SELENOID_BROWSER_IMAGE' => :selenoid_browser_image,
|
34
|
-
'QA_ADDITIONAL_REPOSITORY_STORAGE' => :qa_additional_repository_storage,
|
35
|
-
'QA_PRAEFECT_REPOSITORY_STORAGE' => :qa_praefect_repository_storage,
|
36
|
-
'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
|
37
|
-
'QA_COOKIES' => :qa_cookie,
|
38
|
-
'QA_DEBUG' => :qa_debug,
|
39
|
-
'QA_CAN_TEST_ADMIN_FEATURES' => :qa_can_test_admin_features,
|
40
|
-
'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
|
41
|
-
'QA_CAN_TEST_PRAEFECT' => :qa_can_test_praefect,
|
42
|
-
'QA_SIMULATE_SLOW_CONNECTION' => :qa_simulate_slow_connection,
|
43
|
-
'QA_SLOW_CONNECTION_LATENCY_MS' => :qa_slow_connection_latency_ms,
|
44
|
-
'QA_SLOW_CONNECTION_THROUGHPUT_KBPS' => :qa_slow_connection_throughput_kbps,
|
45
|
-
'QA_GENERATE_ALLURE_REPORT' => :generate_allure_report,
|
46
|
-
'QA_EXPORT_TEST_METRICS' => :qa_export_test_metrics,
|
47
|
-
'QA_INFLUXDB_URL' => :qa_influxdb_url,
|
48
|
-
'QA_INFLUXDB_TOKEN' => :qa_influxdb_token,
|
49
|
-
'QA_SKIP_PULL' => :qa_skip_pull,
|
50
|
-
'QA_VALIDATE_RESOURCE_REUSE' => :qa_validate_resource_reuse,
|
51
|
-
'WEBDRIVER_HEADLESS' => :webdriver_headless,
|
52
|
-
'GITLAB_ADMIN_USERNAME' => :admin_username,
|
53
|
-
'GITLAB_ADMIN_PASSWORD' => :admin_password,
|
54
|
-
'GITLAB_USERNAME' => :user_username,
|
55
|
-
'GITLAB_PASSWORD' => :user_password,
|
56
|
-
'GITLAB_LDAP_USERNAME' => :ldap_username,
|
57
|
-
'GITLAB_LDAP_PASSWORD' => :ldap_password,
|
58
|
-
'GITLAB_FORKER_USERNAME' => :forker_username,
|
59
|
-
'GITLAB_FORKER_PASSWORD' => :forker_password,
|
60
|
-
'GITLAB_USER_TYPE' => :user_type,
|
61
|
-
'GITLAB_SANDBOX_NAME' => :gitlab_sandbox_name,
|
62
|
-
'GITLAB_QA_ACCESS_TOKEN' => :qa_access_token,
|
63
|
-
'GITLAB_QA_ADMIN_ACCESS_TOKEN' => :qa_admin_access_token,
|
64
|
-
'GITLAB_QA_DEV_ACCESS_TOKEN' => :qa_dev_access_token,
|
65
|
-
'GITLAB_QA_CONTAINER_REGISTRY_ACCESS_TOKEN' => :qa_container_registry_access_token,
|
66
|
-
'GITHUB_ACCESS_TOKEN' => :github_access_token,
|
67
|
-
'GITLAB_URL' => :gitlab_url,
|
68
|
-
'SIMPLE_SAML_HOSTNAME' => :simple_saml_hostname,
|
69
|
-
'SIMPLE_SAML_FINGERPRINT' => :simple_saml_fingerprint,
|
70
20
|
'ACCEPT_INSECURE_CERTS' => :accept_insecure_certs,
|
71
|
-
'
|
72
|
-
'
|
73
|
-
'
|
74
|
-
'
|
75
|
-
'
|
76
|
-
'
|
77
|
-
'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1,
|
78
|
-
'GITLAB_QA_PASSWORD_1' => :gitlab_qa_password_1,
|
79
|
-
'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
|
80
|
-
'GITLAB_QA_PASSWORD_2' => :gitlab_qa_password_2,
|
81
|
-
'QA_GITHUB_USERNAME' => :qa_github_username,
|
82
|
-
'QA_GITHUB_PASSWORD' => :qa_github_password,
|
83
|
-
'QA_GITLAB_HOSTNAME' => :qa_gitlab_hostname,
|
84
|
-
'QA_GITLAB_USE_TLS' => :qa_gitlab_use_tls,
|
85
|
-
'KNAPSACK_GENERATE_REPORT' => :knapsack_generate_report,
|
86
|
-
'KNAPSACK_REPORT_PATH' => :knapsack_report_path,
|
87
|
-
'KNAPSACK_TEST_FILE_PATTERN' => :knapsack_test_file_pattern,
|
88
|
-
'KNAPSACK_TEST_DIR' => :knapsack_test_dir,
|
89
|
-
'NO_KNAPSACK' => :no_knapsack,
|
90
|
-
'QA_KNAPSACK_REPORT_GCS_CREDENTIALS' => :qa_knapsack_report_gcs_credentials,
|
91
|
-
'QA_KNAPSACK_REPORT_PATH' => :qa_knapsack_report_path,
|
92
|
-
'QA_RSPEC_REPORT_PATH' => :qa_rspec_report_path,
|
93
|
-
'RSPEC_FAST_QUARANTINE_PATH' => :rspec_fast_quarantine_path,
|
94
|
-
'RSPEC_SKIPPED_TESTS_REPORT_PATH' => :skipped_tests_report_path,
|
21
|
+
'AWS_S3_ACCESS_KEY' => :aws_s3_access_key,
|
22
|
+
'AWS_S3_BUCKET_NAME' => :aws_s3_bucket_name,
|
23
|
+
'AWS_S3_KEY_ID' => :aws_s3_key_id,
|
24
|
+
'AWS_S3_REGION' => :aws_s3_region,
|
25
|
+
'CACHE_NAMESPACE_NAME' => :cache_namespace_name,
|
26
|
+
'CHROME_DISABLE_DEV_SHM' => :chrome_disable_dev_shm,
|
95
27
|
'CI' => :ci,
|
28
|
+
'CI_JOB_ID' => :ci_job_id,
|
96
29
|
'CI_JOB_NAME' => :ci_job_name,
|
97
30
|
'CI_JOB_NAME_SLUG' => :ci_job_name_slug,
|
98
|
-
'CI_JOB_ID' => :ci_job_id,
|
99
|
-
'CI_JOB_URL' => :ci_job_url,
|
100
31
|
'CI_JOB_TOKEN' => :ci_job_token,
|
101
|
-
'
|
102
|
-
'
|
103
|
-
'CI_SERVER_PERSONAL_ACCESS_TOKEN' => :ci_server_personal_access_token,
|
32
|
+
'CI_JOB_URL' => :ci_job_url,
|
33
|
+
'CI_MERGE_REQUEST_IID' => :ci_merge_request_iid,
|
104
34
|
'CI_NODE_INDEX' => :ci_node_index,
|
105
35
|
'CI_NODE_TOTAL' => :ci_node_total,
|
36
|
+
'CI_PIPELINE_CREATED_AT' => :ci_pipeline_created_at,
|
37
|
+
'CI_PIPELINE_ID' => :ci_pipeline_id,
|
38
|
+
'CI_PIPELINE_SOURCE' => :ci_pipeline_source,
|
39
|
+
'CI_PIPELINE_URL' => :ci_pipeline_url,
|
106
40
|
'CI_PROJECT_NAME' => :ci_project_name,
|
107
41
|
'CI_PROJECT_PATH' => :ci_project_path,
|
108
42
|
'CI_PROJECT_PATH_SLUG' => :ci_project_path_slug,
|
109
|
-
'
|
110
|
-
'
|
111
|
-
'
|
112
|
-
'
|
113
|
-
'
|
114
|
-
'
|
43
|
+
'CI_RUNNER_ID' => :ci_runner_id,
|
44
|
+
'CI_SERVER_HOST' => :ci_server_host,
|
45
|
+
'CI_SERVER_PERSONAL_ACCESS_TOKEN' => :ci_server_personal_access_token,
|
46
|
+
'COLORIZED_LOGS' => :colorized_logs,
|
47
|
+
'CLOUDSDK_CORE_PROJECT' => :cloudsdk_core_project,
|
48
|
+
'EE_LICENSE' => :ee_license,
|
115
49
|
'ELASTIC_URL' => :elastic_url,
|
116
|
-
'
|
117
|
-
'
|
118
|
-
'
|
119
|
-
'
|
120
|
-
'
|
121
|
-
'
|
122
|
-
'JIRA_ADMIN_USERNAME' => :jira_admin_username,
|
123
|
-
'JIRA_ADMIN_PASSWORD' => :jira_admin_password,
|
124
|
-
'CACHE_NAMESPACE_NAME' => :cache_namespace_name,
|
125
|
-
'GITLAB_QA_USER_AGENT' => :gitlab_qa_user_agent,
|
50
|
+
'FIPS' => :fips,
|
51
|
+
'GCS_BUCKET_NAME' => :gcs_bucket_name,
|
52
|
+
'GCS_CDN_BUCKET_NAME' => :gcs_cdn_bucket_name,
|
53
|
+
'GCLOUD_ACCOUNT_EMAIL' => :gcloud_account_email,
|
54
|
+
'GCLOUD_ACCOUNT_KEY' => :gcloud_account_key,
|
55
|
+
'GCLOUD_REGION' => :gcloud_region,
|
126
56
|
'GEO_FAILOVER' => :geo_failover,
|
57
|
+
'GEO_MAX_DB_REPLICATION_TIME' => :geo_max_db_replication_time,
|
58
|
+
'GEO_MAX_FILE_REPLICATION_TIME' => :geo_max_file_replication_time,
|
59
|
+
'GITLAB_ADMIN_PASSWORD' => :admin_password,
|
60
|
+
'GITLAB_ADMIN_USERNAME' => :admin_username,
|
61
|
+
'GITLAB_FORKER_PASSWORD' => :forker_password,
|
62
|
+
'GITLAB_FORKER_USERNAME' => :forker_username,
|
127
63
|
'GITLAB_INITIAL_ROOT_PASSWORD' => :initial_root_password,
|
64
|
+
'GITLAB_LDAP_PASSWORD' => :ldap_password,
|
65
|
+
'GITLAB_LDAP_USERNAME' => :ldap_username,
|
66
|
+
'GITLAB_PASSWORD' => :user_password,
|
67
|
+
'GITLAB_QA_ACCESS_TOKEN' => :qa_access_token,
|
68
|
+
'GITLAB_QA_ADMIN_ACCESS_TOKEN' => :qa_admin_access_token,
|
69
|
+
'GITLAB_QA_CONTAINER_REGISTRY_ACCESS_TOKEN' => :qa_container_registry_access_token,
|
70
|
+
'GITLAB_QA_DEV_ACCESS_TOKEN' => :qa_dev_access_token,
|
71
|
+
'GITLAB_QA_FORMLESS_LOGIN_TOKEN' => :gitlab_qa_formless_login_token,
|
72
|
+
'GITLAB_QA_LOOP_RUNNER_MINUTES' => :gitlab_qa_loop_runner_minutes,
|
73
|
+
'GITLAB_QA_PASSWORD_1' => :gitlab_qa_password_1,
|
74
|
+
'GITLAB_QA_PASSWORD_2' => :gitlab_qa_password_2,
|
75
|
+
'GITLAB_QA_USER_AGENT' => :gitlab_qa_user_agent,
|
76
|
+
'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1,
|
77
|
+
'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
|
78
|
+
'GITLAB_SANDBOX_NAME' => :gitlab_sandbox_name,
|
128
79
|
'GITLAB_TLS_CERTIFICATE' => :gitlab_tls_certificate,
|
129
|
-
'
|
130
|
-
'
|
131
|
-
'
|
132
|
-
'
|
133
|
-
'
|
134
|
-
'GOOGLE_PROJECT' => :google_project,
|
135
|
-
'GOOGLE_CLIENT_EMAIL' => :google_client_email,
|
136
|
-
'GOOGLE_JSON_KEY' => :google_json_key,
|
80
|
+
'GITLAB_URL' => :gitlab_url,
|
81
|
+
'GITLAB_USER_TYPE' => :user_type,
|
82
|
+
'GITLAB_USERNAME' => :user_username,
|
83
|
+
'GITLAB_CI' => :gitlab_ci,
|
84
|
+
'GITHUB_ACCESS_TOKEN' => :github_access_token,
|
137
85
|
'GOOGLE_CDN_JSON_KEY' => :google_cdn_json_key,
|
138
86
|
'GOOGLE_CDN_LB' => :google_cdn_load_balancer,
|
139
87
|
'GOOGLE_CDN_SIGNURL_KEY' => :google_cdn_signurl_key,
|
140
88
|
'GOOGLE_CDN_SIGNURL_KEY_NAME' => :google_cdn_signurl_key_name,
|
141
|
-
'
|
142
|
-
'
|
143
|
-
'
|
144
|
-
'NO_ADMIN' => :no_admin,
|
145
|
-
'CHROME_DISABLE_DEV_SHM' => :chrome_disable_dev_shm,
|
146
|
-
'COLORIZED_LOGS' => :colorized_logs,
|
147
|
-
'FIPS' => :fips,
|
89
|
+
'GOOGLE_CLIENT_EMAIL' => :google_client_email,
|
90
|
+
'GOOGLE_JSON_KEY' => :google_json_key,
|
91
|
+
'GOOGLE_PROJECT' => :google_project,
|
148
92
|
'JH_ENV' => :jh_env,
|
93
|
+
'JIRA_ADMIN_PASSWORD' => :jira_admin_password,
|
94
|
+
'JIRA_ADMIN_USERNAME' => :jira_admin_username,
|
95
|
+
'JIRA_HOSTNAME' => :jira_hostname,
|
96
|
+
'KNAPSACK_GENERATE_REPORT' => :knapsack_generate_report,
|
97
|
+
'KNAPSACK_REPORT_PATH' => :knapsack_report_path,
|
98
|
+
'KNAPSACK_TEST_DIR' => :knapsack_test_dir,
|
99
|
+
'KNAPSACK_TEST_FILE_PATTERN' => :knapsack_test_file_pattern,
|
100
|
+
'MAILHOG_HOSTNAME' => :mailhog_hostname,
|
101
|
+
'NO_KNAPSACK' => :no_knapsack,
|
102
|
+
'QA_ADDITIONAL_REPOSITORY_STORAGE' => :qa_additional_repository_storage,
|
103
|
+
'QA_BROWSER' => :browser,
|
104
|
+
'QA_CAN_TEST_ADMIN_FEATURES' => :qa_can_test_admin_features,
|
105
|
+
'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
|
106
|
+
'QA_CAN_TEST_PRAEFECT' => :qa_can_test_praefect,
|
107
|
+
'QA_COOKIES' => :qa_cookie,
|
108
|
+
'QA_DEBUG' => :qa_debug,
|
109
|
+
'QA_DOCKER_NETWORK' => :docker_network,
|
110
|
+
'QA_EXPORT_TEST_METRICS' => :qa_export_test_metrics,
|
111
|
+
'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
|
149
112
|
'QA_GITHUB_OAUTH_APP_ID' => :github_oauth_app_id,
|
150
113
|
'QA_GITHUB_OAUTH_APP_SECRET' => :github_oauth_app_secret,
|
114
|
+
'QA_GITHUB_PASSWORD' => :qa_github_password,
|
115
|
+
'QA_GITHUB_USERNAME' => :qa_github_username,
|
116
|
+
'QA_GITLAB_HOSTNAME' => :qa_gitlab_hostname,
|
117
|
+
'QA_GITLAB_USE_TLS' => :qa_gitlab_use_tls,
|
118
|
+
'QA_IMAGE' => :qa_image,
|
119
|
+
'QA_INFLUXDB_TOKEN' => :qa_influxdb_token,
|
120
|
+
'QA_INFLUXDB_URL' => :qa_influxdb_url,
|
121
|
+
'QA_KNAPSACK_REPORT_GCS_CREDENTIALS' => :qa_knapsack_report_gcs_credentials,
|
122
|
+
'QA_KNAPSACK_REPORT_PATH' => :qa_knapsack_report_path,
|
123
|
+
'QA_LAYOUT' => :layout,
|
124
|
+
'QA_PRAEFECT_REPOSITORY_STORAGE' => :qa_praefect_repository_storage,
|
125
|
+
'QA_RECORD_VIDEO' => :record_video,
|
126
|
+
'QA_REMOTE_GRID' => :remote_grid,
|
127
|
+
'QA_REMOTE_GRID_ACCESS_KEY' => :remote_grid_access_key,
|
128
|
+
'QA_REMOTE_GRID_PROTOCOL' => :remote_grid_protocol,
|
129
|
+
'QA_REMOTE_GRID_USERNAME' => :remote_grid_username,
|
130
|
+
'QA_REMOTE_MOBILE_DEVICE_NAME' => :remote_mobile_device_name,
|
131
|
+
'QA_REMOTE_TUNNEL_ID' => :remote_tunnel_id,
|
132
|
+
'QA_RSPEC_REPORT_PATH' => :qa_rspec_report_path,
|
133
|
+
'QA_SELENOID_BROWSER_IMAGE' => :selenoid_browser_image,
|
134
|
+
'QA_SELENOID_BROWSER_VERSION' => :selenoid_browser_version,
|
135
|
+
'QA_SIMULATE_SLOW_CONNECTION' => :qa_simulate_slow_connection,
|
136
|
+
'QA_SKIP_PULL' => :qa_skip_pull,
|
137
|
+
'QA_SLOW_CONNECTION_LATENCY_MS' => :qa_slow_connection_latency_ms,
|
138
|
+
'QA_SLOW_CONNECTION_THROUGHPUT_KBPS' => :qa_slow_connection_throughput_kbps,
|
139
|
+
'QA_VALIDATE_RESOURCE_REUSE' => :qa_validate_resource_reuse,
|
140
|
+
'QA_VIDEO_RECORDER_IMAGE' => :video_recorder_image,
|
141
|
+
'QA_VIDEO_RECORDER_VERSION' => :video_recorder_version,
|
151
142
|
'QA_1P_EMAIL' => :qa_1p_email,
|
143
|
+
'QA_1P_GITHUB_UUID' => :qa_1p_github_uuid,
|
152
144
|
'QA_1P_PASSWORD' => :qa_1p_password,
|
153
145
|
'QA_1P_SECRET' => :qa_1p_secret,
|
154
|
-
'QA_1P_GITHUB_UUID' => :qa_1p_github_uuid,
|
155
146
|
'RELEASE' => :release,
|
147
|
+
'RELEASE_REGISTRY_PASSWORD' => :release_registry_password,
|
156
148
|
'RELEASE_REGISTRY_URL' => :release_registry_url,
|
157
149
|
'RELEASE_REGISTRY_USERNAME' => :release_registry_username,
|
158
|
-
'
|
150
|
+
'RSPEC_FAST_QUARANTINE_PATH' => :rspec_fast_quarantine_path,
|
151
|
+
'RSPEC_SKIPPED_TESTS_REPORT_PATH' => :skipped_tests_report_path,
|
152
|
+
'SCHEDULE_TYPE' => :schedule_type,
|
159
153
|
'SELENOID_DIRECTORY' => :selenoid_directory,
|
154
|
+
'SIGNUP_DISABLED' => :signup_disabled,
|
155
|
+
'SIMPLE_SAML_FINGERPRINT' => :simple_saml_fingerprint,
|
156
|
+
'SIMPLE_SAML_HOSTNAME' => :simple_saml_hostname,
|
157
|
+
'SMOKE_ONLY' => :smoke_only,
|
158
|
+
'TOP_UPSTREAM_MERGE_REQUEST_IID' => :top_upstream_merge_request_iid,
|
160
159
|
'USE_SELENOID' => :use_selenoid,
|
161
|
-
'
|
160
|
+
'WEBDRIVER_HEADLESS' => :webdriver_headless,
|
161
|
+
'WORKSPACES_DOMAIN_CERT' => { name: :workspaces_domain_cert, type: :file },
|
162
|
+
'WORKSPACES_DOMAIN_KEY' => { name: :workspaces_domain_key, type: :file },
|
162
163
|
'WORKSPACES_OAUTH_APP_ID' => :workspaces_oauth_app_id,
|
163
164
|
'WORKSPACES_OAUTH_APP_SECRET' => :workspaces_oauth_app_secret,
|
164
165
|
'WORKSPACES_OAUTH_SIGNING_KEY' => :workspaces_oauth_signing_key,
|
165
166
|
'WORKSPACES_PROXY_DOMAIN' => :workspaces_proxy_domain,
|
166
|
-
'WORKSPACES_DOMAIN_CERT' => { name: :workspaces_domain_cert, type: :file },
|
167
|
-
'WORKSPACES_DOMAIN_KEY' => { name: :workspaces_domain_key, type: :file },
|
168
167
|
'WORKSPACES_WILDCARD_CERT' => { name: :workspaces_wildcard_cert, type: :file },
|
169
|
-
'WORKSPACES_WILDCARD_KEY' => { name: :workspaces_wildcard_key, type: :file }
|
168
|
+
'WORKSPACES_WILDCARD_KEY' => { name: :workspaces_wildcard_key, type: :file },
|
169
|
+
'EPIC_SYNC_TEST' => :epic_sync_test
|
170
170
|
}.freeze
|
171
171
|
|
172
172
|
def variables
|
@@ -392,9 +392,7 @@ module Gitlab
|
|
392
392
|
live_envs = %w[staging staging-canary staging-ref canary preprod production]
|
393
393
|
return unless live_envs.include?(ci_project_name)
|
394
394
|
|
395
|
-
test_subset = if env_var_value_if_defined('
|
396
|
-
'sanity-no-admin'
|
397
|
-
elsif env_var_value_if_defined('SMOKE_ONLY') == 'true'
|
395
|
+
test_subset = if env_var_value_if_defined('SMOKE_ONLY') == 'true'
|
398
396
|
'sanity'
|
399
397
|
else
|
400
398
|
'full'
|
@@ -403,6 +401,13 @@ module Gitlab
|
|
403
401
|
"#{ci_project_name}-#{test_subset}"
|
404
402
|
end
|
405
403
|
|
404
|
+
# The default network for the Docker containers
|
405
|
+
#
|
406
|
+
# @example <component>.test
|
407
|
+
def docker_network
|
408
|
+
env_var_value_if_defined('QA_DOCKER_NETWORK') || 'test'
|
409
|
+
end
|
410
|
+
|
406
411
|
def docker_add_hosts
|
407
412
|
(env_var_value_if_defined('QA_DOCKER_ADD_HOSTS') || '').split(',')
|
408
413
|
end
|
@@ -13,7 +13,7 @@ module Gitlab
|
|
13
13
|
# Uses https://docs.docker.com/engine/reference/commandline/network_create/#network-internal-mode
|
14
14
|
@airgapped_network_name = 'airgapped'
|
15
15
|
# Uses iptables to deny all network traffic, with a number of exceptions for required ports and IPs
|
16
|
-
@iptables_restricted_network =
|
16
|
+
@iptables_restricted_network = Runtime::Env.docker_network
|
17
17
|
@config = Component::GitalyCluster::GitalyClusterConfig.new(
|
18
18
|
gitlab_name: "gitlab-airgapped-#{SecureRandom.hex(4)}",
|
19
19
|
airgapped_network: true,
|
@@ -17,7 +17,7 @@ module Gitlab
|
|
17
17
|
Component::Gitlab.perform do |gitlab|
|
18
18
|
gitlab.release = release
|
19
19
|
gitlab.volumes = @volumes
|
20
|
-
gitlab.network =
|
20
|
+
gitlab.network = Runtime::Env.docker_network
|
21
21
|
gitlab.name = Runtime::Env.qa_gitlab_hostname
|
22
22
|
gitlab.seed_admin_token = @seed_admin_token
|
23
23
|
gitlab.tls = Runtime::Env.qa_gitlab_use_tls?
|
@@ -9,7 +9,7 @@ module Gitlab
|
|
9
9
|
def perform(release, *rspec_args)
|
10
10
|
Component::Gitlab.perform do |gitlab|
|
11
11
|
gitlab.release = release
|
12
|
-
gitlab.network =
|
12
|
+
gitlab.network = Runtime::Env.docker_network
|
13
13
|
gitlab.relative_path = '/relative'
|
14
14
|
|
15
15
|
gitlab.omnibus_configuration << "external_url '#{gitlab.address}'"
|
@@ -10,7 +10,7 @@ module Gitlab
|
|
10
10
|
Component::Gitlab.perform do |gitlab|
|
11
11
|
gitlab.release = QA::Release.new(release)
|
12
12
|
gitlab.name = 'gitlab'
|
13
|
-
gitlab.network =
|
13
|
+
gitlab.network = Runtime::Env.docker_network
|
14
14
|
gitlab.omnibus_configuration << gitlab_omnibus_configuration
|
15
15
|
cluster = Component::GitalyCluster.perform do |c|
|
16
16
|
c.config = Component::GitalyCluster::GitalyClusterConfig.new(gitlab_name: 'gitlab')
|
@@ -10,7 +10,7 @@ module Gitlab
|
|
10
10
|
SETUP_DEST_PATH = '/tmp/setup-scripts'
|
11
11
|
|
12
12
|
def initialize
|
13
|
-
@network =
|
13
|
+
@network = Runtime::Env.docker_network
|
14
14
|
@ai_gateway_name = 'ai-gateway'
|
15
15
|
@ai_gateway_hostname = "#{@ai_gateway_name}.#{@network}"
|
16
16
|
@ai_gateway_port = 5000
|
@@ -42,6 +42,7 @@ module Gitlab
|
|
42
42
|
gitlab.network = @network
|
43
43
|
|
44
44
|
gitlab.omnibus_gitlab_rails_env['AI_GATEWAY_URL'] = "http://#{@ai_gateway_hostname}:#{@ai_gateway_port}"
|
45
|
+
gitlab.omnibus_gitlab_rails_env['LLM_DEBUG'] = 'true'
|
45
46
|
|
46
47
|
gitlab.set_ee_activation_code if @use_cloud_license
|
47
48
|
end
|
@@ -26,7 +26,7 @@ module Gitlab
|
|
26
26
|
setup_elasticsearch_on gitlab
|
27
27
|
|
28
28
|
Component::Elasticsearch.perform do |elastic|
|
29
|
-
elastic.network =
|
29
|
+
elastic.network = Runtime::Env.docker_network
|
30
30
|
elastic.instance do
|
31
31
|
gitlab.instance do
|
32
32
|
Runtime::Logger.info("Running #{spec_suite} specs!")
|
@@ -49,7 +49,7 @@ module Gitlab
|
|
49
49
|
|
50
50
|
def setup_elasticsearch_on(instance)
|
51
51
|
instance.name = gitlab_name
|
52
|
-
instance.network =
|
52
|
+
instance.network = Runtime::Env.docker_network
|
53
53
|
instance.elastic_url = 'http://elastic68:9200'
|
54
54
|
instance.exec_commands = empty_index
|
55
55
|
end
|
@@ -8,7 +8,7 @@ module Gitlab
|
|
8
8
|
class GitlabPages < Scenario::Template
|
9
9
|
def initialize
|
10
10
|
@gitlab_name = 'gitlab-pages'
|
11
|
-
@network =
|
11
|
+
@network = Runtime::Env.docker_network
|
12
12
|
@pages_host = 'gitlab-pages.test'
|
13
13
|
@pages_sandbox_name = 'gitlab-qa-sandbox-group-pages'
|
14
14
|
@tag = 'gitlab_pages'
|
@@ -14,7 +14,7 @@ module Gitlab
|
|
14
14
|
#
|
15
15
|
class Import < Scenario::Template
|
16
16
|
def initialize
|
17
|
-
@network =
|
17
|
+
@network = Runtime::Env.docker_network
|
18
18
|
@source_gitlab = Component::Gitlab.new.tap { |gitlab| gitlab.network = @network }
|
19
19
|
@target_gitlab = Component::Gitlab.new.tap { |gitlab| gitlab.network = @network }
|
20
20
|
@mock_server = Component::MockServer.new.tap do |server|
|
@@ -9,7 +9,7 @@ module Gitlab
|
|
9
9
|
def perform(release, *rspec_args)
|
10
10
|
Component::Gitlab.perform do |gitlab|
|
11
11
|
gitlab.release = QA::Release.new(release)
|
12
|
-
gitlab.network =
|
12
|
+
gitlab.network = Runtime::Env.docker_network
|
13
13
|
gitlab.name = 'gitlab-integrations'
|
14
14
|
gitlab.instance do
|
15
15
|
Component::Specs.perform do |specs|
|
@@ -9,7 +9,7 @@ module Gitlab
|
|
9
9
|
def perform(release, *rspec_args)
|
10
10
|
Component::Gitlab.perform do |gitlab|
|
11
11
|
gitlab.release = QA::Release.new(release)
|
12
|
-
gitlab.network =
|
12
|
+
gitlab.network = Runtime::Env.docker_network
|
13
13
|
gitlab.name = 'gitlab-jira'
|
14
14
|
|
15
15
|
Component::Jira.perform do |jira|
|
@@ -21,7 +21,7 @@ module Gitlab
|
|
21
21
|
|
22
22
|
def initialize
|
23
23
|
@ldap_name = 'ldap-server'
|
24
|
-
@network =
|
24
|
+
@network = Runtime::Env.docker_network
|
25
25
|
end
|
26
26
|
|
27
27
|
def configure_omnibus(gitlab)
|
@@ -69,7 +69,7 @@ module Gitlab
|
|
69
69
|
def orchestrate_ldap(&block)
|
70
70
|
Component::LDAP.perform do |ldap|
|
71
71
|
ldap.name = 'ldap-server'
|
72
|
-
ldap.network =
|
72
|
+
ldap.network = Runtime::Env.docker_network
|
73
73
|
ldap.set_gitlab_credentials
|
74
74
|
ldap.tls = tls
|
75
75
|
|
@@ -81,7 +81,7 @@ module Gitlab
|
|
81
81
|
Component::Gitlab.perform do |gitlab|
|
82
82
|
gitlab.release = release
|
83
83
|
gitlab.name = gitlab_name
|
84
|
-
gitlab.network =
|
84
|
+
gitlab.network = Runtime::Env.docker_network
|
85
85
|
gitlab.tls = tls
|
86
86
|
configure_omnibus(gitlab)
|
87
87
|
|
@@ -9,7 +9,7 @@ module Gitlab
|
|
9
9
|
def perform(release, *rspec_args)
|
10
10
|
Component::Gitlab.perform do |gitlab|
|
11
11
|
gitlab.release = release
|
12
|
-
gitlab.network =
|
12
|
+
gitlab.network = Runtime::Env.docker_network
|
13
13
|
|
14
14
|
mattermost_hostname = "mattermost.#{gitlab.network}"
|
15
15
|
mattermost_external_url = "http://#{mattermost_hostname}"
|
@@ -12,7 +12,7 @@ module Gitlab
|
|
12
12
|
def perform(release, *rspec_args)
|
13
13
|
Component::Gitlab.perform do |gitlab|
|
14
14
|
gitlab.release = release
|
15
|
-
gitlab.network =
|
15
|
+
gitlab.network = Runtime::Env.docker_network
|
16
16
|
gitlab.name = 'gitlab'
|
17
17
|
gitlab.ports = [PUMA_METRICS_SERVER_PORT, SIDEKIQ_METRICS_SERVER_PORT]
|
18
18
|
|
@@ -27,7 +27,7 @@ module Gitlab
|
|
27
27
|
setup_opensearch_on gitlab
|
28
28
|
|
29
29
|
Component::Opensearch.perform do |opensearch|
|
30
|
-
opensearch.network =
|
30
|
+
opensearch.network = Runtime::Env.docker_network
|
31
31
|
opensearch.instance do
|
32
32
|
gitlab.instance do
|
33
33
|
Runtime::Logger.info("Running #{spec_suite} specs!")
|
@@ -50,7 +50,7 @@ module Gitlab
|
|
50
50
|
|
51
51
|
def setup_opensearch_on(instance)
|
52
52
|
instance.name = gitlab_name
|
53
|
-
instance.network =
|
53
|
+
instance.network = Runtime::Env.docker_network
|
54
54
|
instance.elastic_url = "http://elastic68:9200"
|
55
55
|
instance.exec_commands = empty_index
|
56
56
|
end
|
@@ -9,7 +9,7 @@ module Gitlab
|
|
9
9
|
def perform(release, *rspec_args)
|
10
10
|
Component::Gitlab.perform do |gitlab|
|
11
11
|
gitlab.release = release
|
12
|
-
gitlab.network =
|
12
|
+
gitlab.network = Runtime::Env.docker_network
|
13
13
|
gitlab.name = 'gitlab'
|
14
14
|
|
15
15
|
gitlab.omnibus_configuration << <<~OMNIBUS
|
@@ -11,9 +11,9 @@ module Gitlab
|
|
11
11
|
|
12
12
|
Component::Gitlab.perform do |gitlab|
|
13
13
|
gitlab.release = release
|
14
|
-
gitlab.network =
|
14
|
+
gitlab.network = Runtime::Env.docker_network
|
15
15
|
gitlab.name = 'gitlab'
|
16
|
-
gitlab.seed_admin_token =
|
16
|
+
gitlab.seed_admin_token = true
|
17
17
|
sign_url_key_path = gitlab.create_key_file('GOOGLE_CDN_SIGNURL_KEY')
|
18
18
|
cdn_gcloud_path = gitlab.create_key_file('GOOGLE_CDN_JSON_KEY')
|
19
19
|
|
@@ -18,19 +18,19 @@ module Gitlab
|
|
18
18
|
# no-op
|
19
19
|
end
|
20
20
|
|
21
|
-
def perform(release, *rspec_args)
|
21
|
+
def perform(release, *rspec_args) # rubocop:disable Metrics/AbcSize
|
22
22
|
release = QA::Release.new(release)
|
23
23
|
before_perform(release)
|
24
24
|
|
25
25
|
Component::Gitlab.perform do |gitlab|
|
26
26
|
gitlab.release = release
|
27
|
-
gitlab.network =
|
27
|
+
gitlab.network = Runtime::Env.docker_network
|
28
28
|
gitlab.name = gitlab_name
|
29
29
|
gitlab.set_accept_insecure_certs
|
30
30
|
|
31
31
|
if saml_component
|
32
32
|
Component::SAML.perform do |saml|
|
33
|
-
saml.network =
|
33
|
+
saml.network = Runtime::Env.docker_network
|
34
34
|
configure(gitlab, saml)
|
35
35
|
|
36
36
|
saml.instance do
|
@@ -9,7 +9,7 @@ module Gitlab
|
|
9
9
|
def perform(release, *rspec_args)
|
10
10
|
Component::Gitlab.perform do |gitlab|
|
11
11
|
gitlab.release = release
|
12
|
-
gitlab.network =
|
12
|
+
gitlab.network = Runtime::Env.docker_network
|
13
13
|
|
14
14
|
gitlab.omnibus_configuration << <<~OMNIBUS
|
15
15
|
gitlab_rails['usage_ping_enabled'] = false;
|
@@ -82,9 +82,9 @@ module Gitlab
|
|
82
82
|
# @return [String]
|
83
83
|
def upgrade_path_yml
|
84
84
|
@upgrade_path_yml ||= begin
|
85
|
-
logger.info("Fetching gitlab upgrade path from 'gitlab
|
85
|
+
logger.info("Fetching gitlab upgrade path from 'gitlab.com/gitlab-org/gitlab' project")
|
86
86
|
HttpRequest.make_http_request(
|
87
|
-
url: "https://gitlab.com/gitlab-
|
87
|
+
url: "https://gitlab.com/gitlab-org/gitlab/-/raw/master/config/upgrade_path.yml"
|
88
88
|
).body
|
89
89
|
end
|
90
90
|
end
|
data/lib/gitlab/qa/version.rb
CHANGED
@@ -119,7 +119,6 @@ module RuboCop
|
|
119
119
|
'GCS_CDN_BUCKET_NAME' => :gcs_cdn_bucket_name,
|
120
120
|
'GCS_BUCKET_NAME' => :gcs_bucket_name,
|
121
121
|
'SMOKE_ONLY' => :smoke_only,
|
122
|
-
'NO_ADMIN' => :no_admin,
|
123
122
|
'CHROME_DISABLE_DEV_SHM' => :chrome_disable_dev_shm,
|
124
123
|
'COLORIZED_LOGS' => :colorized_logs,
|
125
124
|
'FIPS' => :fips,
|
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: 14.
|
4
|
+
version: 14.11.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: 2024-
|
11
|
+
date: 2024-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -409,7 +409,6 @@ files:
|
|
409
409
|
- lib/gitlab/qa/component/staging.rb
|
410
410
|
- lib/gitlab/qa/component/staging_ref.rb
|
411
411
|
- lib/gitlab/qa/component/suggested_reviewer.rb
|
412
|
-
- lib/gitlab/qa/component/telegraf.rb
|
413
412
|
- lib/gitlab/qa/docker/command.rb
|
414
413
|
- lib/gitlab/qa/docker/engine.rb
|
415
414
|
- lib/gitlab/qa/docker/volumes.rb
|
@@ -442,7 +441,6 @@ files:
|
|
442
441
|
- lib/gitlab/qa/scenario/test/instance/repository_storage.rb
|
443
442
|
- lib/gitlab/qa/scenario/test/instance/smoke.rb
|
444
443
|
- lib/gitlab/qa/scenario/test/instance/staging.rb
|
445
|
-
- lib/gitlab/qa/scenario/test/instance/staging_geo.rb
|
446
444
|
- lib/gitlab/qa/scenario/test/instance/staging_ref.rb
|
447
445
|
- lib/gitlab/qa/scenario/test/instance/staging_ref_geo.rb
|
448
446
|
- lib/gitlab/qa/scenario/test/integration/ai_gateway.rb
|
@@ -480,7 +478,6 @@ files:
|
|
480
478
|
- lib/gitlab/qa/scenario/test/omnibus/image.rb
|
481
479
|
- lib/gitlab/qa/scenario/test/omnibus/update_from_previous.rb
|
482
480
|
- lib/gitlab/qa/scenario/test/omnibus/upgrade.rb
|
483
|
-
- lib/gitlab/qa/scenario/test/sanity/version.rb
|
484
481
|
- lib/gitlab/qa/service/cluster_provider/base.rb
|
485
482
|
- lib/gitlab/qa/service/cluster_provider/k3d.rb
|
486
483
|
- lib/gitlab/qa/service/kubernetes_cluster.rb
|
@@ -1,175 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'tempfile'
|
4
|
-
|
5
|
-
module Gitlab
|
6
|
-
module QA
|
7
|
-
module Component
|
8
|
-
# Component to collect docker metrics
|
9
|
-
#
|
10
|
-
class Telegraf < Base
|
11
|
-
DOCKER_IMAGE = 'telegraf'
|
12
|
-
DOCKER_IMAGE_TAG = '1.21-alpine'
|
13
|
-
LOG_DIR = '/etc/telegraf/log'
|
14
|
-
|
15
|
-
def initialize
|
16
|
-
super
|
17
|
-
|
18
|
-
@name = DOCKER_IMAGE
|
19
|
-
@host_log_dir = "#{Runtime::Env.host_artifacts_dir}/#{@name}"
|
20
|
-
@environment = Runtime::Env.variables.slice(
|
21
|
-
'QA_INFLUXDB_TOKEN',
|
22
|
-
'QA_INFLUXDB_URL',
|
23
|
-
'QA_RUN_TYPE',
|
24
|
-
'CI_JOB_NAME',
|
25
|
-
'CI_PIPELINE_ID'
|
26
|
-
)
|
27
|
-
end
|
28
|
-
|
29
|
-
attr_reader :name, :host_log_dir, :telegraf_config
|
30
|
-
|
31
|
-
# Start container
|
32
|
-
#
|
33
|
-
# @return [void]
|
34
|
-
def start
|
35
|
-
docker.run(image: image, tag: tag) do |command|
|
36
|
-
set_command_args(command)
|
37
|
-
set_volumes(command)
|
38
|
-
set_environment(command)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# Run prepare commands
|
43
|
-
#
|
44
|
-
# @return [void]
|
45
|
-
def prepare
|
46
|
-
@telegraf_config = File.open("#{Dir.mktmpdir(nil, ENV.fetch('CI_BUILDS_DIR', nil))}/telegraf.conf",
|
47
|
-
'w') do |file|
|
48
|
-
file.write(config)
|
49
|
-
file.path
|
50
|
-
end
|
51
|
-
FileUtils.mkdir_p(host_log_dir)
|
52
|
-
|
53
|
-
prepare_docker_image
|
54
|
-
prepare_docker_container
|
55
|
-
end
|
56
|
-
|
57
|
-
# Run teardown
|
58
|
-
#
|
59
|
-
# @return [void]
|
60
|
-
def teardown
|
61
|
-
return unless run_telegraf?
|
62
|
-
|
63
|
-
super
|
64
|
-
end
|
65
|
-
|
66
|
-
private
|
67
|
-
|
68
|
-
# Set custom run command arguments
|
69
|
-
#
|
70
|
-
# @param [Docker::Command] command
|
71
|
-
# @return [void]
|
72
|
-
def set_command_args(command)
|
73
|
-
command << '-d'
|
74
|
-
command << "--name #{name}"
|
75
|
-
command << "--user root"
|
76
|
-
command << "--entrypoint telegraf"
|
77
|
-
end
|
78
|
-
|
79
|
-
# Set volumes
|
80
|
-
#
|
81
|
-
# @param [Docker::Command] command
|
82
|
-
# @return [void]
|
83
|
-
def set_volumes(command)
|
84
|
-
command.volume(host_log_dir, LOG_DIR)
|
85
|
-
command.volume('/var/run/docker.sock', '/var/run/docker.sock')
|
86
|
-
command.volume(telegraf_config, '/etc/telegraf/telegraf.conf', :ro)
|
87
|
-
end
|
88
|
-
|
89
|
-
# Set environment variables
|
90
|
-
#
|
91
|
-
# @param [Docker::Command] command
|
92
|
-
# @return [void]
|
93
|
-
def set_environment(command)
|
94
|
-
environment.each { |k, v| command.env(k, v) }
|
95
|
-
end
|
96
|
-
|
97
|
-
# Run main entrypoint
|
98
|
-
#
|
99
|
-
# @return [void]
|
100
|
-
def instance_no_teardown
|
101
|
-
if run_telegraf?
|
102
|
-
super
|
103
|
-
else
|
104
|
-
Runtime::Logger.debug("Skipping starting telegraf container!")
|
105
|
-
yield self if block_given?
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
# Should telegraf be started
|
110
|
-
#
|
111
|
-
# Run only on CI and skip if metrics explicitly disabled, run_type not set or influx params missing
|
112
|
-
#
|
113
|
-
# @return [Boolean]
|
114
|
-
def run_telegraf?
|
115
|
-
Runtime::Env.ci && Runtime::Env.qa_export_test_metrics? && Runtime::Env.qa_run_type && !missing_influx_config?
|
116
|
-
end
|
117
|
-
|
118
|
-
# Influxdb config params missing
|
119
|
-
#
|
120
|
-
# @return [Boolean]
|
121
|
-
def missing_influx_config?
|
122
|
-
environment.slice('QA_INFLUXDB_TOKEN', 'QA_INFLUXDB_URL').any? { |_k, v| v.blank? }
|
123
|
-
end
|
124
|
-
|
125
|
-
# Telegraf configuration
|
126
|
-
#
|
127
|
-
# @return [String]
|
128
|
-
def config
|
129
|
-
<<~CONFIG
|
130
|
-
[global_tags]
|
131
|
-
run_type = "${QA_RUN_TYPE}"
|
132
|
-
pipeline_id = "${CI_PIPELINE_ID}"
|
133
|
-
job_name = "${CI_JOB_NAME}"
|
134
|
-
|
135
|
-
[agent]
|
136
|
-
interval = "1s"
|
137
|
-
round_interval = true
|
138
|
-
metric_batch_size = 1000
|
139
|
-
metric_buffer_limit = 10000
|
140
|
-
collection_jitter = "0s"
|
141
|
-
flush_interval = "10s"
|
142
|
-
flush_jitter = "0s"
|
143
|
-
precision = ""
|
144
|
-
debug = true
|
145
|
-
logtarget = "file"
|
146
|
-
logfile = "#{LOG_DIR}/telegraf.log"
|
147
|
-
hostname = ""
|
148
|
-
omit_hostname = false
|
149
|
-
|
150
|
-
[[outputs.influxdb_v2]]
|
151
|
-
urls = ["${QA_INFLUXDB_URL}"]
|
152
|
-
token = "${QA_INFLUXDB_TOKEN}"
|
153
|
-
organization = "gitlab-qa"
|
154
|
-
bucket = "test-env-stats"
|
155
|
-
|
156
|
-
[[inputs.docker]]
|
157
|
-
endpoint = "unix:///var/run/docker.sock"
|
158
|
-
gather_services = false
|
159
|
-
container_names = []
|
160
|
-
source_tag = false
|
161
|
-
container_name_include = []
|
162
|
-
container_name_exclude = ["#{name}"]
|
163
|
-
timeout = "5s"
|
164
|
-
perdevice = false
|
165
|
-
perdevice_include = []
|
166
|
-
total = true
|
167
|
-
total_include = ["cpu", "blkio", "network"]
|
168
|
-
docker_label_include = []
|
169
|
-
docker_label_exclude = []
|
170
|
-
CONFIG
|
171
|
-
end
|
172
|
-
end
|
173
|
-
end
|
174
|
-
end
|
175
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Gitlab
|
4
|
-
module QA
|
5
|
-
module Scenario
|
6
|
-
module Test
|
7
|
-
module Instance
|
8
|
-
##
|
9
|
-
# Run test suite against staging.gitlab.com
|
10
|
-
#
|
11
|
-
class StagingGeo < DeploymentBase
|
12
|
-
def initialize
|
13
|
-
@suite = 'QA::EE::Scenario::Test::Geo'
|
14
|
-
end
|
15
|
-
|
16
|
-
def deployment_component
|
17
|
-
Component::Staging
|
18
|
-
end
|
19
|
-
|
20
|
-
def non_rspec_args
|
21
|
-
[
|
22
|
-
'--primary-address', deployment_component::ADDRESS,
|
23
|
-
'--secondary-address', deployment_component::GEO_SECONDARY_ADDRESS,
|
24
|
-
'--without-setup'
|
25
|
-
]
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,93 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'json'
|
4
|
-
require 'net/http'
|
5
|
-
require 'cgi'
|
6
|
-
require 'time'
|
7
|
-
|
8
|
-
module Gitlab
|
9
|
-
module QA
|
10
|
-
module Scenario
|
11
|
-
module Test
|
12
|
-
module Sanity
|
13
|
-
# This test checks that the sha_version of a GitLab was authored in
|
14
|
-
# the window defined by the `weekday_hours` method.
|
15
|
-
# We perform a single API call to get the commit
|
16
|
-
class Version < Scenario::Template
|
17
|
-
SOURCE_MAP = {
|
18
|
-
'git@dev.gitlab.org:gitlab/gitlab-ee.git' => {
|
19
|
-
host: 'dev.gitlab.org',
|
20
|
-
project: 'gitlab/gitlab-ee'
|
21
|
-
},
|
22
|
-
'git@dev.gitlab.org:gitlab/gitlabhq.git' => {
|
23
|
-
host: 'dev.gitlab.org',
|
24
|
-
project: 'gitlab/gitlabhq'
|
25
|
-
},
|
26
|
-
'git@gitlab.com:gitlab-org/gitlab.git' => {
|
27
|
-
host: 'gitlab.com',
|
28
|
-
project: 'gitlab-org/gitlab'
|
29
|
-
},
|
30
|
-
'git@gitlab.com:gitlab-org/gitlab-foss.git' => {
|
31
|
-
host: 'gitlab.com',
|
32
|
-
project: 'gitlab-org/gitlab-foss'
|
33
|
-
}
|
34
|
-
}.freeze
|
35
|
-
|
36
|
-
def perform(release = 'ce')
|
37
|
-
version = Component::Gitlab.perform do |gitlab|
|
38
|
-
gitlab.release = release
|
39
|
-
gitlab.act do
|
40
|
-
pull
|
41
|
-
rails_version
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
project = SOURCE_MAP[version[:source]][:project]
|
46
|
-
host = SOURCE_MAP[version[:source]][:host]
|
47
|
-
sha = version[:sha]
|
48
|
-
commit = api_commit_detail(host, project, sha)
|
49
|
-
|
50
|
-
if commit_within_hours?(commit['created_at'], weekday_hours(commit['created_at']))
|
51
|
-
puts "Found commit #{sha} in recent history of #{project} on #{host}"
|
52
|
-
else
|
53
|
-
puts "Did not find #{sha} in recent history of #{project} on #{host}"
|
54
|
-
exit 1
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
private
|
59
|
-
|
60
|
-
def weekday_hours(date_string)
|
61
|
-
case Date.parse(date_string).wday
|
62
|
-
# Sunday
|
63
|
-
when 0
|
64
|
-
48
|
65
|
-
# Monday
|
66
|
-
when 1
|
67
|
-
72
|
68
|
-
else
|
69
|
-
24
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
def commit_within_hours?(commit_time_string, hours)
|
74
|
-
Time.at(Time.parse(commit_time_string).utc).to_datetime > Time.at((Time.now - (hours * 60 * 60)).utc).to_datetime
|
75
|
-
end
|
76
|
-
|
77
|
-
def api_commit_detail(host, project, sha)
|
78
|
-
url = "https://#{host}/api/v4/projects/#{CGI.escape(project)}/repository/commits/#{sha}"
|
79
|
-
|
80
|
-
if host == 'dev.gitlab.org'
|
81
|
-
Runtime::Env.require_qa_dev_access_token!
|
82
|
-
|
83
|
-
url = "#{url}?private_token=#{Runtime::Env.qa_dev_access_token}"
|
84
|
-
end
|
85
|
-
|
86
|
-
JSON.parse(Net::HTTP.get(URI(url)))
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|