gitlab-qa 10.4.1 → 11.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 +4 -4
- data/.gitlab/changelog_config.yml +13 -0
- data/.gitlab/merge_request_templates/Release.md +9 -36
- data/.rubocop_todo.yml +0 -12
- data/Dangerfile +1 -5
- data/Gemfile.lock +4 -4
- data/README.md +1 -2
- data/docs/running_against_remote_grid.md +39 -2
- data/gitlab-qa.gemspec +1 -1
- data/lib/gitlab/qa/component/gitaly_cluster.rb +0 -1
- data/lib/gitlab/qa/component/gitlab.rb +10 -9
- data/lib/gitlab/qa/component/selenoid.rb +8 -3
- data/lib/gitlab/qa/runtime/env.rb +21 -41
- data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +0 -2
- data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +0 -2
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +0 -1
- data/lib/gitlab/qa/scenario/test/integration/praefect.rb +0 -2
- data/lib/gitlab/qa/scenario/test/integration/registry_with_cdn.rb +2 -2
- data/lib/gitlab/qa/version.rb +1 -1
- data/lib/gitlab/qa.rb +0 -1
- data/support/data/admin_access_token_seed.rb +4 -1
- metadata +5 -39
- data/bin/slack +0 -14
- data/exe/gitlab-qa-report +0 -10
- data/lib/gitlab/qa/report/base_test_results.rb +0 -39
- data/lib/gitlab/qa/report/find_set_dri.rb +0 -43
- data/lib/gitlab/qa/report/generate_test_session.rb +0 -275
- data/lib/gitlab/qa/report/gitlab_issue_client.rb +0 -190
- data/lib/gitlab/qa/report/gitlab_issue_dry_client.rb +0 -28
- data/lib/gitlab/qa/report/j_unit_test_results.rb +0 -27
- data/lib/gitlab/qa/report/json_test_results.rb +0 -29
- data/lib/gitlab/qa/report/prepare_stage_reports.rb +0 -86
- data/lib/gitlab/qa/report/relate_failure_issue.rb +0 -374
- data/lib/gitlab/qa/report/report_as_issue.rb +0 -176
- data/lib/gitlab/qa/report/report_results.rb +0 -64
- data/lib/gitlab/qa/report/results_in_issues.rb +0 -126
- data/lib/gitlab/qa/report/results_in_testcases.rb +0 -111
- data/lib/gitlab/qa/report/results_reporter_shared.rb +0 -70
- data/lib/gitlab/qa/report/summary_table.rb +0 -43
- data/lib/gitlab/qa/report/test_result.rb +0 -184
- data/lib/gitlab/qa/report/update_screenshot_path.rb +0 -63
- data/lib/gitlab/qa/reporter.rb +0 -131
- data/lib/gitlab/qa/runtime/token_finder.rb +0 -44
- data/lib/gitlab/qa/slack/post_to_slack.rb +0 -30
- data/lib/gitlab/qa/system_logs/finders/json_log_finder.rb +0 -65
- data/lib/gitlab/qa/system_logs/finders/rails/api_log_finder.rb +0 -21
- data/lib/gitlab/qa/system_logs/finders/rails/application_log_finder.rb +0 -21
- data/lib/gitlab/qa/system_logs/finders/rails/exception_log_finder.rb +0 -21
- data/lib/gitlab/qa/system_logs/finders/rails/graphql_log_finder.rb +0 -21
- data/lib/gitlab/qa/system_logs/log_types/log.rb +0 -38
- data/lib/gitlab/qa/system_logs/log_types/rails/api_log.rb +0 -34
- data/lib/gitlab/qa/system_logs/log_types/rails/application_log.rb +0 -27
- data/lib/gitlab/qa/system_logs/log_types/rails/exception_log.rb +0 -23
- data/lib/gitlab/qa/system_logs/log_types/rails/graphql_log.rb +0 -30
- data/lib/gitlab/qa/system_logs/shared_fields.rb +0 -29
- data/lib/gitlab/qa/system_logs/system_logs_formatter.rb +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8096dd0f8bbb920768cdba226589b8fff443c277c03795ebdb7281b1fa0b243e
|
4
|
+
data.tar.gz: 376b71befea84be9b722cc53e8f3929382781fd5c47b1a29c7f5540117417fb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ebb0fc14b72801c83a462b08cbea11f05fffa6366dd8ddbc07838d31d052f65bad914b88acecec1d2528981188603da215712894f4c0c8f2f71b932fe206dfa
|
7
|
+
data.tar.gz: f707dc6915ac54490314c5ef89805bcde649990cbbfff9151360a3341d30c3820034c65afdaecaf52df58cf986c00005b5974fb526a4dfaebb6f9c6e81bb9b36
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
# Settings for generating changelogs using the GitLab API. See
|
3
|
+
# https://docs.gitlab.com/ee/api/repositories.html#generate-changelog-data for
|
4
|
+
# more information.
|
5
|
+
categories:
|
6
|
+
added: Added
|
7
|
+
fixed: Fixed
|
8
|
+
changed: Changed
|
9
|
+
deprecated: Deprecated
|
10
|
+
removed: Removed
|
11
|
+
security: Security
|
12
|
+
performance: Performance
|
13
|
+
other: Other
|
@@ -1,40 +1,13 @@
|
|
1
|
-
<!-- Replace
|
2
|
-
|
3
|
-
|
1
|
+
<!-- Replace `<PREVIOUS_VERSION>` with the previous version number here, `<COMMIT_UPDATING_VERSION>` with the latest
|
2
|
+
commit from this merge request, and `<NEW_VERSION>` with the upcoming version number. -->
|
3
|
+
## Diff
|
4
4
|
|
5
|
-
-
|
5
|
+
https://gitlab.com/gitlab-org/gitlab-qa/-/compare/v<PREVIOUS_VERSION>...<COMMIT_UPDATING_VERSION>
|
6
6
|
|
7
|
-
|
7
|
+
## Checklist
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
- [ ] Diff link is up-to-date.
|
10
|
+
- [ ] Check the release notes: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-qa/repository/changelog?version=<NEW_VERSION>
|
11
|
+
- [ ] Based on the diff and the release notes, `version.rb` is updated, according to [SemVer](https://semver.org).
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
### Fixes
|
15
|
-
|
16
|
-
- !bbb <Title of the bbb MR>.
|
17
|
-
|
18
|
-
### Doc changes
|
19
|
-
|
20
|
-
- !ccc <Title of the ccc MR>.
|
21
|
-
|
22
|
-
### Other changes (CI, backstage)
|
23
|
-
|
24
|
-
- !ddd <Title of the ddd MR>.
|
25
|
-
```
|
26
|
-
|
27
|
-
- Checklist before merging:
|
28
|
-
- [ ] Diff link is up-to-date.
|
29
|
-
- [ ] Based on the diff, `lib/gitlab/qa/version.rb` is updated, according to [SemVer](https://semver.org).
|
30
|
-
- [ ] Release notes are accurate.
|
31
|
-
|
32
|
-
- Checklist after merging:
|
33
|
-
- [ ] [Update the release notes for the newly created tag](docs/release_process.md#how-to).
|
34
|
-
|
35
|
-
- Checklist after gitlab-qa version has been released by the post merge pipeline:
|
36
|
-
- [ ] In the pipeline-common project, [update the GITLAB_QA_VERSION](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/base.gitlab-ci.yml) and [create a release](https://gitlab.com/gitlab-org/quality/pipeline-common#release-process).
|
37
|
-
- [ ] In the GitLab project, update the ref for pipeline-common in [qa-common](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/qa-common/main.gitlab-ci.yml) and [review-apps](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/review-apps/qa.gitlab-ci.yml).
|
38
|
-
- [ ] Unless already done by [renovate-gitlab-bot](https://gitlab.com/dashboard/merge_requests?scope=all&state=opened&author_username=gitlab-dependency-update-bot&label_name[]=Quality), or if you need it sooner, in the GitLab project, [update the gitlab-qa gem version](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/Gemfile) and [`Gemfile.lock`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/Gemfile.lock) (for an example, see: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117054).
|
39
|
-
|
40
|
-
/label ~Quality ~"type::maintenance" ~"maintenance::dependency"
|
13
|
+
/label ~Quality ~"type::maintenance" ~"maintenance::dependency" ~Quality
|
data/.rubocop_todo.yml
CHANGED
@@ -33,8 +33,6 @@ Lint/ConstantDefinitionInBlock:
|
|
33
33
|
Lint/MixedRegexpCaptureTypes:
|
34
34
|
Exclude:
|
35
35
|
- 'lib/gitlab/qa/release.rb'
|
36
|
-
- 'lib/gitlab/qa/report/relate_failure_issue.rb'
|
37
|
-
- 'lib/gitlab/qa/report/update_screenshot_path.rb'
|
38
36
|
|
39
37
|
# Offense count: 2
|
40
38
|
# Cop supports --auto-correct.
|
@@ -110,22 +108,12 @@ Style/MutableConstant:
|
|
110
108
|
- 'db/post_migrate/**/*'
|
111
109
|
- 'db/geo/migrate/**/*'
|
112
110
|
- 'lib/gitlab/qa/release.rb'
|
113
|
-
- 'lib/gitlab/qa/report/update_screenshot_path.rb'
|
114
111
|
|
115
112
|
# Offense count: 9
|
116
113
|
# Cop supports --auto-correct.
|
117
114
|
Style/RedundantRegexpEscape:
|
118
115
|
Exclude:
|
119
116
|
- 'lib/gitlab/qa/release.rb'
|
120
|
-
- 'lib/gitlab/qa/report/generate_test_session.rb'
|
121
|
-
- 'lib/gitlab/qa/report/relate_failure_issue.rb'
|
122
|
-
- 'lib/gitlab/qa/report/update_screenshot_path.rb'
|
123
|
-
|
124
|
-
# Offense count: 1
|
125
|
-
# Cop supports --auto-correct.
|
126
|
-
Style/StringConcatenation:
|
127
|
-
Exclude:
|
128
|
-
- 'lib/gitlab/qa/reporter.rb'
|
129
117
|
|
130
118
|
# Offense count: 191
|
131
119
|
# Cop supports --auto-correct.
|
data/Dangerfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gitlab-qa (
|
4
|
+
gitlab-qa (11.1.0)
|
5
5
|
activesupport (~> 6.1)
|
6
|
-
gitlab (~> 4.
|
6
|
+
gitlab (~> 4.19)
|
7
7
|
http (~> 5.0)
|
8
8
|
nokogiri (~> 1.10)
|
9
9
|
parallel (>= 1, < 2)
|
@@ -91,8 +91,8 @@ GEM
|
|
91
91
|
git (1.12.0)
|
92
92
|
addressable (~> 2.8)
|
93
93
|
rchardet (~> 1.8)
|
94
|
-
gitlab (4.
|
95
|
-
httparty (~> 0.
|
94
|
+
gitlab (4.19.0)
|
95
|
+
httparty (~> 0.20)
|
96
96
|
terminal-table (>= 1.5.1)
|
97
97
|
gitlab-dangerfiles (2.11.0)
|
98
98
|
danger (>= 8.4.5)
|
data/README.md
CHANGED
@@ -96,8 +96,7 @@ of tests.
|
|
96
96
|
## How do we use it
|
97
97
|
|
98
98
|
Currently, we execute the test suite against GitLab Docker images created by
|
99
|
-
Omnibus nightly via a
|
100
|
-
project.
|
99
|
+
Omnibus nightly via a [`gitlab-org/gitlab` nightly schedule pipeline](https://gitlab.com/gitlab-org/gitlab/-/pipeline_schedules).
|
101
100
|
|
102
101
|
We also execute the test suite nightly against our [staging environment](https://staging.gitlab.com)
|
103
102
|
via a pipeline in the [staging project](https://gitlab.com/gitlab-org/quality/staging).
|
@@ -8,19 +8,56 @@ I.e, if you have a Selenium server set up at http://localhost:4444 or if you hav
|
|
8
8
|
|
9
9
|
| Variable | Description | Default | Example(s) |
|
10
10
|
|---------------------------|----------------------------------------------------------------|----------|--------------------------------|
|
11
|
-
| QA_BROWSER | Browser to run against | "chrome" | "chrome" "
|
12
|
-
| QA_BROWSER_VERSION | Version of browser to run against | "
|
11
|
+
| QA_BROWSER | Browser to run against | "chrome" | "chrome" "edge" |
|
12
|
+
| QA_BROWSER_VERSION | Version of browser to run against | "111.0" | "latest" "111.0" "mobile-111.0"|
|
13
13
|
| QA_REMOTE_GRID_PROTOCOL | Protocol to use | "http" | "http" "https" |
|
14
14
|
| QA_REMOTE_GRID | Remote grid to run tests against | | "localhost:3000" "provider:80" "selenoid:4444" |
|
15
15
|
| QA_LAYOUT | Used with Selenoid. Tells test nav to expect collapsed menus. "phone" expects collapsed top and left nav bars, "tablet" expects collapsed left nav bar only. | | "phone", "tablet" |
|
16
16
|
| SELENOID_DIRECTORY | Used with Selenoid. Directory to save videos to | "<host_artifacts_dir>/selenoid" | |
|
17
17
|
| USE_SELENOID | Used with Selenoid. Sets up selenoid containers. | false | false, true |
|
18
18
|
| QA_RECORD_VIDEO | Used with Selenoid. Triggers video recording. | false | false, true |
|
19
|
+
| QA_BROWSER_IMAGE | Used with Selenoid. Sets the browser image to use for video recording. | "selenoid/chrome" | "selenoid/chrome", "registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab" |
|
20
|
+
| QA_VIDEO_RECORDER_IMAGE | Used with Selenoid. Sets the video recorder image to use for video recording. | "presidenten/selenoid-manual-video-recorder" | "presidenten/selenoid-manual-video-recorder" |
|
21
|
+
| QA_VIDEO_RECORDER_VERSION | Used with Selenoid. Sets the video recorder image version to use for video recording. | "latest" | "latest" |
|
22
|
+
| QA_RECORD_VIDEO | Used with Selenoid. Triggers video recording. | false | false, true |
|
19
23
|
| QA_REMOTE_GRID_USERNAME | Used with Sauce Labs. Username to specify in the remote grid. "USERNAME@provider:80" | | "gitlab-sl" |
|
20
24
|
| QA_REMOTE_GRID_ACCESS_KEY | Used with Sauce Labs. Key/Token paired with `QA_REMOTE_GRID_USERNAME` | | |
|
21
25
|
| QA_REMOTE_TUNNEL_ID | Used with Sauce Labs. Name of the remote tunnel to use | "gitlab-sl_tunnel_id" | |
|
22
26
|
| QA_REMOTE_MOBILE_DEVICE_NAME | Used with Sauce Labs. Name of mobile device to test against. `QA_BROWSER` must be set to `safari` for iOS devices and `chrome` for Android devices. | | "iPhone 12 Simulator" |
|
23
27
|
|
28
|
+
## Testing with Selenoid
|
29
|
+
|
30
|
+
Running directly against an environment like staging is not recommended because test videos can expose credentials. Therefore, it is best practice to not run against live environments.
|
31
|
+
|
32
|
+
Available browsers are defined in [browsers.json](https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/fixtures/selenoid/browsers.json)
|
33
|
+
|
34
|
+
Failure videos are available as job artifacts in the selenoid directory.
|
35
|
+
|
36
|
+
### Add failure video recording to a pipeline for a non-live environment
|
37
|
+
|
38
|
+
Set these environment variables:
|
39
|
+
|
40
|
+
USE_SELENOID=true
|
41
|
+
QA_RECORD_VIDEO=true
|
42
|
+
QA_REMOTE_GRID="selenoid:4444"
|
43
|
+
|
44
|
+
#### To test with an Edge browser instead of Chrome
|
45
|
+
|
46
|
+
Include these environment variables:
|
47
|
+
|
48
|
+
QA_BROWSER="edge"
|
49
|
+
QA_BROWSER_IMAGE="selenoid/edge"
|
50
|
+
|
51
|
+
#### To test with a Chrome mobile device browser
|
52
|
+
|
53
|
+
Include these environment variables:
|
54
|
+
|
55
|
+
QA_LAYOUT="phone"
|
56
|
+
QA_BROWSER_IMAGE="registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab"
|
57
|
+
QA_BROWSER_VERSION=mobile-111.0
|
58
|
+
|
59
|
+
For now we only have version 111.0 available for chrome mobile browser testing.
|
60
|
+
|
24
61
|
## Testing with Sauce Labs
|
25
62
|
|
26
63
|
Running directly against an environment like staging is not recommended because test logs expose credentials. Therefore, it is best practice and the default to use a tunnel.
|
data/gitlab-qa.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_development_dependency 'webmock', '3.7.0'
|
35
35
|
|
36
36
|
spec.add_runtime_dependency 'activesupport', '~> 6.1'
|
37
|
-
spec.add_runtime_dependency 'gitlab', '~> 4.
|
37
|
+
spec.add_runtime_dependency 'gitlab', '~> 4.19'
|
38
38
|
spec.add_runtime_dependency 'http', '~> 5.0'
|
39
39
|
spec.add_runtime_dependency 'nokogiri', '~> 1.10'
|
40
40
|
spec.add_runtime_dependency 'parallel', '>= 1', '< 2'
|
@@ -235,17 +235,18 @@ module Gitlab
|
|
235
235
|
manifest['software']['package-scripts']['locked_version']
|
236
236
|
end
|
237
237
|
|
238
|
-
def
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
238
|
+
def create_key_file(env_key)
|
239
|
+
key_file = Tempfile.create(env_key.downcase, ENV['CI_PROJECT_DIR'] || Dir.tmpdir).then do |file|
|
240
|
+
file.write(ENV.fetch(env_key))
|
241
|
+
file.fsync
|
242
|
+
file.close
|
243
243
|
|
244
|
-
|
245
|
-
|
246
|
-
|
244
|
+
file.path
|
245
|
+
end
|
246
|
+
File.chmod(0o744, key_file)
|
247
|
+
@volumes[key_file] = key_file
|
247
248
|
|
248
|
-
key_file
|
249
|
+
key_file
|
249
250
|
end
|
250
251
|
|
251
252
|
private
|
@@ -27,7 +27,12 @@ module Gitlab
|
|
27
27
|
|
28
28
|
def start
|
29
29
|
pull_images
|
30
|
-
docker.run(image: image, tag: tag, args:
|
30
|
+
docker.run(image: image, tag: tag, args:
|
31
|
+
['-video-recorder-image',
|
32
|
+
QA::Runtime::Env.video_recorder_image,
|
33
|
+
'-container-network',
|
34
|
+
network]
|
35
|
+
) do |command|
|
31
36
|
set_command_args(command)
|
32
37
|
set_volumes(command)
|
33
38
|
end
|
@@ -55,8 +60,8 @@ module Gitlab
|
|
55
60
|
end
|
56
61
|
|
57
62
|
def pull_images
|
58
|
-
docker.pull(image:
|
59
|
-
docker.pull(image:
|
63
|
+
docker.pull(image: QA::Runtime::Env.browser_image, tag: Runtime::Env.browser_version)
|
64
|
+
docker.pull(image: QA::Runtime::Env.video_recorder_image, tag: QA::Runtime::Env.video_recorder_version)
|
60
65
|
end
|
61
66
|
|
62
67
|
# Set custom run command arguments
|
@@ -25,12 +25,14 @@ module Gitlab
|
|
25
25
|
'QA_BROWSER_VERSION' => :browser_version,
|
26
26
|
'QA_RECORD_VIDEO' => :record_video,
|
27
27
|
'QA_LAYOUT' => :layout,
|
28
|
+
'QA_VIDEO_RECORDER_IMAGE' => :video_recorder_image,
|
29
|
+
'QA_VIDEO_RECORDER_VERSION' => :video_recorder_version,
|
30
|
+
'QA_BROWSER_IMAGE' => :browser_image,
|
28
31
|
'QA_ADDITIONAL_REPOSITORY_STORAGE' => :qa_additional_repository_storage,
|
29
32
|
'QA_PRAEFECT_REPOSITORY_STORAGE' => :qa_praefect_repository_storage,
|
30
33
|
'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
|
31
34
|
'QA_COOKIES' => :qa_cookie,
|
32
35
|
'QA_DEBUG' => :qa_debug,
|
33
|
-
'QA_DEFAULT_BRANCH' => :qa_default_branch,
|
34
36
|
'QA_CAN_TEST_ADMIN_FEATURES' => :qa_can_test_admin_features,
|
35
37
|
'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
|
36
38
|
'QA_CAN_TEST_PRAEFECT' => :qa_can_test_praefect,
|
@@ -45,7 +47,6 @@ module Gitlab
|
|
45
47
|
'QA_SKIP_PULL' => :qa_skip_pull,
|
46
48
|
'QA_VALIDATE_RESOURCE_REUSE' => :qa_validate_resource_reuse,
|
47
49
|
'WEBDRIVER_HEADLESS' => :webdriver_headless,
|
48
|
-
'GITLAB_API_BASE' => :api_base,
|
49
50
|
'GITLAB_ADMIN_USERNAME' => :admin_username,
|
50
51
|
'GITLAB_ADMIN_PASSWORD' => :admin_password,
|
51
52
|
'GITLAB_USERNAME' => :user_username,
|
@@ -60,7 +61,6 @@ module Gitlab
|
|
60
61
|
'GITLAB_QA_ADMIN_ACCESS_TOKEN' => :qa_admin_access_token,
|
61
62
|
'GITLAB_QA_DEV_ACCESS_TOKEN' => :qa_dev_access_token,
|
62
63
|
'GITLAB_QA_CONTAINER_REGISTRY_ACCESS_TOKEN' => :qa_container_registry_access_token,
|
63
|
-
'GITLAB_QA_ISSUE_URL' => :qa_issue_url,
|
64
64
|
'GITHUB_ACCESS_TOKEN' => :github_access_token,
|
65
65
|
'GITLAB_URL' => :gitlab_url,
|
66
66
|
'SIMPLE_SAML_HOSTNAME' => :simple_saml_hostname,
|
@@ -72,7 +72,6 @@ module Gitlab
|
|
72
72
|
'CLOUDSDK_CORE_PROJECT' => :cloudsdk_core_project,
|
73
73
|
'GCLOUD_REGION' => :gcloud_region,
|
74
74
|
'SIGNUP_DISABLED' => :signup_disabled,
|
75
|
-
'GITLAB_CI_API_TOKEN' => :gitlab_ci_api_token,
|
76
75
|
'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1,
|
77
76
|
'GITLAB_QA_PASSWORD_1' => :gitlab_qa_password_1,
|
78
77
|
'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
|
@@ -86,7 +85,6 @@ module Gitlab
|
|
86
85
|
'QA_KNAPSACK_REPORT_GCS_CREDENTIALS' => :qa_knapsack_report_gcs_credentials,
|
87
86
|
'QA_KNAPSACK_REPORT_PATH' => :qa_knapsack_report_path,
|
88
87
|
'CI' => :ci,
|
89
|
-
'CI_COMMIT_REF_NAME' => :ci_commit_ref_name,
|
90
88
|
'CI_JOB_NAME' => :ci_job_name,
|
91
89
|
'CI_JOB_URL' => :ci_job_url,
|
92
90
|
'CI_JOB_TOKEN' => :ci_job_token,
|
@@ -95,22 +93,16 @@ module Gitlab
|
|
95
93
|
'CI_SERVER_PERSONAL_ACCESS_TOKEN' => :ci_server_personal_access_token,
|
96
94
|
'CI_NODE_INDEX' => :ci_node_index,
|
97
95
|
'CI_NODE_TOTAL' => :ci_node_total,
|
98
|
-
'CI_PROJECT_ID' => :ci_project_id,
|
99
96
|
'CI_PROJECT_NAME' => :ci_project_name,
|
100
97
|
'CI_PROJECT_PATH' => :ci_project_path,
|
101
|
-
'CI_SLACK_WEBHOOK_URL' => :ci_slack_webhook_url,
|
102
|
-
'CI_PIPELINE_ID' => :ci_pipeline_id,
|
103
98
|
'CI_PIPELINE_SOURCE' => :ci_pipeline_source,
|
104
99
|
'CI_PIPELINE_URL' => :ci_pipeline_url,
|
105
100
|
'CI_PIPELINE_CREATED_AT' => :ci_pipeline_created_at,
|
106
101
|
'CI_MERGE_REQUEST_IID' => :ci_merge_request_iid,
|
107
|
-
'CI_API_V4_URL' => :ci_api_v4_url,
|
108
102
|
'GITLAB_CI' => :gitlab_ci,
|
109
103
|
'ELASTIC_URL' => :elastic_url,
|
110
104
|
'GITLAB_QA_LOOP_RUNNER_MINUTES' => :gitlab_qa_loop_runner_minutes,
|
111
105
|
'MAILHOG_HOSTNAME' => :mailhog_hostname,
|
112
|
-
'SLACK_QA_CHANNEL' => :slack_qa_channel,
|
113
|
-
'SLACK_ICON_EMOJI' => :slack_icon_emoji,
|
114
106
|
'GITLAB_QA_FORMLESS_LOGIN_TOKEN' => :gitlab_qa_formless_login_token,
|
115
107
|
'GEO_MAX_FILE_REPLICATION_TIME' => :geo_max_file_replication_time,
|
116
108
|
'GEO_MAX_DB_REPLICATION_TIME' => :geo_max_db_replication_time,
|
@@ -118,7 +110,6 @@ module Gitlab
|
|
118
110
|
'JIRA_ADMIN_USERNAME' => :jira_admin_username,
|
119
111
|
'JIRA_ADMIN_PASSWORD' => :jira_admin_password,
|
120
112
|
'CACHE_NAMESPACE_NAME' => :cache_namespace_name,
|
121
|
-
'DEPLOY_VERSION' => :deploy_version,
|
122
113
|
'GITLAB_QA_USER_AGENT' => :gitlab_qa_user_agent,
|
123
114
|
'GEO_FAILOVER' => :geo_failover,
|
124
115
|
'GITLAB_INITIAL_ROOT_PASSWORD' => :initial_root_password,
|
@@ -154,7 +145,8 @@ module Gitlab
|
|
154
145
|
'RELEASE_REGISTRY_USERNAME' => :release_registry_username,
|
155
146
|
'RELEASE_REGISTRY_PASSWORD' => :release_registry_password,
|
156
147
|
'SELENOID_DIRECTORY' => :selenoid_directory,
|
157
|
-
'USE_SELENOID' => :use_selenoid
|
148
|
+
'USE_SELENOID' => :use_selenoid,
|
149
|
+
'SCHEDULE_TYPE' => :schedule_type
|
158
150
|
}.freeze
|
159
151
|
|
160
152
|
ENV_VARIABLES.each do |env_name, method_name|
|
@@ -196,10 +188,6 @@ module Gitlab
|
|
196
188
|
env_var_value_if_defined('QA_LOG_PATH') || host_artifacts_dir
|
197
189
|
end
|
198
190
|
|
199
|
-
def default_branch
|
200
|
-
env_var_value_if_defined('QA_DEFAULT_BRANCH') || 'main'
|
201
|
-
end
|
202
|
-
|
203
191
|
def gitlab_availability_timeout
|
204
192
|
(env_var_value_if_defined('GITLAB_QA_AVAILABILITY_TIMEOUT') || 360).to_i
|
205
193
|
end
|
@@ -212,14 +200,6 @@ module Gitlab
|
|
212
200
|
env_var_value_if_defined('GITLAB_DEV_USERNAME') || 'gitlab-qa-bot'
|
213
201
|
end
|
214
202
|
|
215
|
-
def gitlab_api_base
|
216
|
-
env_var_value_if_defined('GITLAB_API_BASE') || 'https://gitlab.com/api/v4'
|
217
|
-
end
|
218
|
-
|
219
|
-
def pipeline_from_project_name
|
220
|
-
ci_project_name.to_s.start_with?('gitlab') ? QA::Runtime::Env.default_branch : ci_project_name
|
221
|
-
end
|
222
|
-
|
223
203
|
def run_id
|
224
204
|
@run_id ||= "gitlab-qa-run-#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}-#{SecureRandom.hex(4)}"
|
225
205
|
end
|
@@ -236,10 +216,6 @@ module Gitlab
|
|
236
216
|
env_var_value_if_defined('GITLAB_INITIAL_ROOT_PASSWORD') || '5iveL!fe'
|
237
217
|
end
|
238
218
|
|
239
|
-
def deploy_environment
|
240
|
-
env_var_value_if_defined('DEPLOY_ENVIRONMENT') || pipeline_from_project_name
|
241
|
-
end
|
242
|
-
|
243
219
|
def host_artifacts_dir
|
244
220
|
@host_artifacts_dir ||= File.join(
|
245
221
|
env_var_value_if_defined('QA_ARTIFACTS_DIR') || '/tmp/gitlab-qa', Runtime::Env.run_id
|
@@ -278,18 +254,6 @@ module Gitlab
|
|
278
254
|
raise ArgumentError, "Please provide GITLAB_QA_DEV_ACCESS_TOKEN"
|
279
255
|
end
|
280
256
|
|
281
|
-
def require_slack_qa_channel!
|
282
|
-
return unless env_var_value_if_defined('SLACK_QA_CHANNEL').to_s.strip.empty?
|
283
|
-
|
284
|
-
raise ArgumentError, "Please provide SLACK_QA_CHANNEL"
|
285
|
-
end
|
286
|
-
|
287
|
-
def require_ci_slack_webhook_url!
|
288
|
-
return unless env_var_value_if_defined('CI_SLACK_WEBHOOK_URL').to_s.strip.empty?
|
289
|
-
|
290
|
-
raise ArgumentError, "Please provide CI_SLACK_WEBHOOK_URL"
|
291
|
-
end
|
292
|
-
|
293
257
|
def require_qa_container_registry_access_token!
|
294
258
|
return unless env_var_value_if_defined('GITLAB_QA_CONTAINER_REGISTRY_ACCESS_TOKEN').to_s.strip.empty?
|
295
259
|
|
@@ -367,6 +331,22 @@ module Gitlab
|
|
367
331
|
env_var_value_if_defined('QA_LAYOUT')&.match?(/tablet|phone/i)
|
368
332
|
end
|
369
333
|
|
334
|
+
def video_recorder_image
|
335
|
+
env_var_value_if_defined('QA_VIDEO_RECORDER_IMAGE') || 'presidenten/selenoid-manual-video-recorder'
|
336
|
+
end
|
337
|
+
|
338
|
+
def video_recorder_version
|
339
|
+
env_var_value_if_defined('QA_VIDEO_RECORDER_VERSION') || 'latest'
|
340
|
+
end
|
341
|
+
|
342
|
+
def browser_image
|
343
|
+
env_var_value_if_defined('QA_BROWSER_IMAGE') || 'selenoid/chrome'
|
344
|
+
end
|
345
|
+
|
346
|
+
def browser_version
|
347
|
+
env_var_value_if_defined('QA_BROWSER_VERSION') || '111.0'
|
348
|
+
end
|
349
|
+
|
370
350
|
def qa_run_type
|
371
351
|
return env_var_value_if_defined('QA_RUN_TYPE') if env_var_value_valid?('QA_RUN_TYPE')
|
372
352
|
|
@@ -14,8 +14,8 @@ module Gitlab
|
|
14
14
|
gitlab.network = 'test'
|
15
15
|
gitlab.name = 'gitlab'
|
16
16
|
gitlab.seed_admin_token = false
|
17
|
-
sign_url_key_path = gitlab.
|
18
|
-
cdn_gcloud_path = gitlab.
|
17
|
+
sign_url_key_path = gitlab.create_key_file('GOOGLE_CDN_SIGNURL_KEY')
|
18
|
+
cdn_gcloud_path = gitlab.create_key_file('GOOGLE_CDN_JSON_KEY')
|
19
19
|
|
20
20
|
gitlab.omnibus_configuration << <<~OMNIBUS
|
21
21
|
external_url 'http://#{gitlab.name}.#{gitlab.network}';
|
data/lib/gitlab/qa/version.rb
CHANGED
data/lib/gitlab/qa.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'active_support/core_ext/numeric/time'
|
4
|
+
|
3
5
|
class AdminAccessTokenSeed
|
4
6
|
TOKEN_VALUE = 'ypCa3Dzb23o5nvsixwPA'
|
5
7
|
SCOPES = Gitlab::Auth.all_available_scopes
|
@@ -9,7 +11,8 @@ class AdminAccessTokenSeed
|
|
9
11
|
|
10
12
|
token_params = {
|
11
13
|
scopes: SCOPES.map(&:to_s),
|
12
|
-
name: 'admin-api-token'
|
14
|
+
name: 'admin-api-token',
|
15
|
+
expires_at: 3.days.from_now
|
13
16
|
}
|
14
17
|
|
15
18
|
admin_user.personal_access_tokens.build(token_params).tap do |pat|
|