gitlab-qa 10.6.0 → 11.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +0 -12
- data/Gemfile.lock +1 -1
- data/lib/gitlab/qa/component/gitlab.rb +10 -9
- data/lib/gitlab/qa/runtime/env.rb +0 -40
- 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
- metadata +2 -37
- 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: 027a7adf23728caa5763905518db78906926714945f9f111c18be1034fde3fc7
|
4
|
+
data.tar.gz: 8b3527b3d9a36294b46485986eb2508c38ba8085e81699cd757e4d856333b078
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e22acb6339fc0f9cd33c6c368a0b07e315351df4e9e6e3db8ec77cb8dcea99af9cba11b67a84774475e8e37e03793f8de38e1284a8e70d38e5d540bb23f4f297
|
7
|
+
data.tar.gz: a10f28bed0706bf8dd0921ef2b6c0d7eafdc3f86f593d0b904837f860b8dbf9287c0c13a4157db7b878d2d60b0c962e4bf1d885cd3d7b0a76951aae86fb9f682
|
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/Gemfile.lock
CHANGED
@@ -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
|
@@ -33,7 +33,6 @@ module Gitlab
|
|
33
33
|
'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
|
34
34
|
'QA_COOKIES' => :qa_cookie,
|
35
35
|
'QA_DEBUG' => :qa_debug,
|
36
|
-
'QA_DEFAULT_BRANCH' => :qa_default_branch,
|
37
36
|
'QA_CAN_TEST_ADMIN_FEATURES' => :qa_can_test_admin_features,
|
38
37
|
'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
|
39
38
|
'QA_CAN_TEST_PRAEFECT' => :qa_can_test_praefect,
|
@@ -48,7 +47,6 @@ module Gitlab
|
|
48
47
|
'QA_SKIP_PULL' => :qa_skip_pull,
|
49
48
|
'QA_VALIDATE_RESOURCE_REUSE' => :qa_validate_resource_reuse,
|
50
49
|
'WEBDRIVER_HEADLESS' => :webdriver_headless,
|
51
|
-
'GITLAB_API_BASE' => :api_base,
|
52
50
|
'GITLAB_ADMIN_USERNAME' => :admin_username,
|
53
51
|
'GITLAB_ADMIN_PASSWORD' => :admin_password,
|
54
52
|
'GITLAB_USERNAME' => :user_username,
|
@@ -63,7 +61,6 @@ module Gitlab
|
|
63
61
|
'GITLAB_QA_ADMIN_ACCESS_TOKEN' => :qa_admin_access_token,
|
64
62
|
'GITLAB_QA_DEV_ACCESS_TOKEN' => :qa_dev_access_token,
|
65
63
|
'GITLAB_QA_CONTAINER_REGISTRY_ACCESS_TOKEN' => :qa_container_registry_access_token,
|
66
|
-
'GITLAB_QA_ISSUE_URL' => :qa_issue_url,
|
67
64
|
'GITHUB_ACCESS_TOKEN' => :github_access_token,
|
68
65
|
'GITLAB_URL' => :gitlab_url,
|
69
66
|
'SIMPLE_SAML_HOSTNAME' => :simple_saml_hostname,
|
@@ -75,7 +72,6 @@ module Gitlab
|
|
75
72
|
'CLOUDSDK_CORE_PROJECT' => :cloudsdk_core_project,
|
76
73
|
'GCLOUD_REGION' => :gcloud_region,
|
77
74
|
'SIGNUP_DISABLED' => :signup_disabled,
|
78
|
-
'GITLAB_CI_API_TOKEN' => :gitlab_ci_api_token,
|
79
75
|
'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1,
|
80
76
|
'GITLAB_QA_PASSWORD_1' => :gitlab_qa_password_1,
|
81
77
|
'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
|
@@ -89,7 +85,6 @@ module Gitlab
|
|
89
85
|
'QA_KNAPSACK_REPORT_GCS_CREDENTIALS' => :qa_knapsack_report_gcs_credentials,
|
90
86
|
'QA_KNAPSACK_REPORT_PATH' => :qa_knapsack_report_path,
|
91
87
|
'CI' => :ci,
|
92
|
-
'CI_COMMIT_REF_NAME' => :ci_commit_ref_name,
|
93
88
|
'CI_JOB_NAME' => :ci_job_name,
|
94
89
|
'CI_JOB_URL' => :ci_job_url,
|
95
90
|
'CI_JOB_TOKEN' => :ci_job_token,
|
@@ -98,22 +93,16 @@ module Gitlab
|
|
98
93
|
'CI_SERVER_PERSONAL_ACCESS_TOKEN' => :ci_server_personal_access_token,
|
99
94
|
'CI_NODE_INDEX' => :ci_node_index,
|
100
95
|
'CI_NODE_TOTAL' => :ci_node_total,
|
101
|
-
'CI_PROJECT_ID' => :ci_project_id,
|
102
96
|
'CI_PROJECT_NAME' => :ci_project_name,
|
103
97
|
'CI_PROJECT_PATH' => :ci_project_path,
|
104
|
-
'CI_SLACK_WEBHOOK_URL' => :ci_slack_webhook_url,
|
105
|
-
'CI_PIPELINE_ID' => :ci_pipeline_id,
|
106
98
|
'CI_PIPELINE_SOURCE' => :ci_pipeline_source,
|
107
99
|
'CI_PIPELINE_URL' => :ci_pipeline_url,
|
108
100
|
'CI_PIPELINE_CREATED_AT' => :ci_pipeline_created_at,
|
109
101
|
'CI_MERGE_REQUEST_IID' => :ci_merge_request_iid,
|
110
|
-
'CI_API_V4_URL' => :ci_api_v4_url,
|
111
102
|
'GITLAB_CI' => :gitlab_ci,
|
112
103
|
'ELASTIC_URL' => :elastic_url,
|
113
104
|
'GITLAB_QA_LOOP_RUNNER_MINUTES' => :gitlab_qa_loop_runner_minutes,
|
114
105
|
'MAILHOG_HOSTNAME' => :mailhog_hostname,
|
115
|
-
'SLACK_QA_CHANNEL' => :slack_qa_channel,
|
116
|
-
'SLACK_ICON_EMOJI' => :slack_icon_emoji,
|
117
106
|
'GITLAB_QA_FORMLESS_LOGIN_TOKEN' => :gitlab_qa_formless_login_token,
|
118
107
|
'GEO_MAX_FILE_REPLICATION_TIME' => :geo_max_file_replication_time,
|
119
108
|
'GEO_MAX_DB_REPLICATION_TIME' => :geo_max_db_replication_time,
|
@@ -121,7 +110,6 @@ module Gitlab
|
|
121
110
|
'JIRA_ADMIN_USERNAME' => :jira_admin_username,
|
122
111
|
'JIRA_ADMIN_PASSWORD' => :jira_admin_password,
|
123
112
|
'CACHE_NAMESPACE_NAME' => :cache_namespace_name,
|
124
|
-
'DEPLOY_VERSION' => :deploy_version,
|
125
113
|
'GITLAB_QA_USER_AGENT' => :gitlab_qa_user_agent,
|
126
114
|
'GEO_FAILOVER' => :geo_failover,
|
127
115
|
'GITLAB_INITIAL_ROOT_PASSWORD' => :initial_root_password,
|
@@ -200,10 +188,6 @@ module Gitlab
|
|
200
188
|
env_var_value_if_defined('QA_LOG_PATH') || host_artifacts_dir
|
201
189
|
end
|
202
190
|
|
203
|
-
def default_branch
|
204
|
-
env_var_value_if_defined('QA_DEFAULT_BRANCH') || 'main'
|
205
|
-
end
|
206
|
-
|
207
191
|
def gitlab_availability_timeout
|
208
192
|
(env_var_value_if_defined('GITLAB_QA_AVAILABILITY_TIMEOUT') || 360).to_i
|
209
193
|
end
|
@@ -216,14 +200,6 @@ module Gitlab
|
|
216
200
|
env_var_value_if_defined('GITLAB_DEV_USERNAME') || 'gitlab-qa-bot'
|
217
201
|
end
|
218
202
|
|
219
|
-
def gitlab_api_base
|
220
|
-
env_var_value_if_defined('GITLAB_API_BASE') || 'https://gitlab.com/api/v4'
|
221
|
-
end
|
222
|
-
|
223
|
-
def pipeline_from_project_name
|
224
|
-
ci_project_name.to_s.start_with?('gitlab') ? QA::Runtime::Env.default_branch : ci_project_name
|
225
|
-
end
|
226
|
-
|
227
203
|
def run_id
|
228
204
|
@run_id ||= "gitlab-qa-run-#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}-#{SecureRandom.hex(4)}"
|
229
205
|
end
|
@@ -240,10 +216,6 @@ module Gitlab
|
|
240
216
|
env_var_value_if_defined('GITLAB_INITIAL_ROOT_PASSWORD') || '5iveL!fe'
|
241
217
|
end
|
242
218
|
|
243
|
-
def deploy_environment
|
244
|
-
env_var_value_if_defined('DEPLOY_ENVIRONMENT') || pipeline_from_project_name
|
245
|
-
end
|
246
|
-
|
247
219
|
def host_artifacts_dir
|
248
220
|
@host_artifacts_dir ||= File.join(
|
249
221
|
env_var_value_if_defined('QA_ARTIFACTS_DIR') || '/tmp/gitlab-qa', Runtime::Env.run_id
|
@@ -282,18 +254,6 @@ module Gitlab
|
|
282
254
|
raise ArgumentError, "Please provide GITLAB_QA_DEV_ACCESS_TOKEN"
|
283
255
|
end
|
284
256
|
|
285
|
-
def require_slack_qa_channel!
|
286
|
-
return unless env_var_value_if_defined('SLACK_QA_CHANNEL').to_s.strip.empty?
|
287
|
-
|
288
|
-
raise ArgumentError, "Please provide SLACK_QA_CHANNEL"
|
289
|
-
end
|
290
|
-
|
291
|
-
def require_ci_slack_webhook_url!
|
292
|
-
return unless env_var_value_if_defined('CI_SLACK_WEBHOOK_URL').to_s.strip.empty?
|
293
|
-
|
294
|
-
raise ArgumentError, "Please provide CI_SLACK_WEBHOOK_URL"
|
295
|
-
end
|
296
|
-
|
297
257
|
def require_qa_container_registry_access_token!
|
298
258
|
return unless env_var_value_if_defined('GITLAB_QA_CONTAINER_REGISTRY_ACCESS_TOKEN').to_s.strip.empty?
|
299
259
|
|
@@ -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
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:
|
4
|
+
version: 11.0.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-
|
11
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -313,7 +313,6 @@ email:
|
|
313
313
|
- gitlab-qa@gmail.com
|
314
314
|
executables:
|
315
315
|
- gitlab-qa
|
316
|
-
- gitlab-qa-report
|
317
316
|
extensions: []
|
318
317
|
extra_rdoc_files: []
|
319
318
|
files:
|
@@ -340,7 +339,6 @@ files:
|
|
340
339
|
- bin/gen-cert.sh
|
341
340
|
- bin/merge_html_reports
|
342
341
|
- bin/setup
|
343
|
-
- bin/slack
|
344
342
|
- docs/README.md
|
345
343
|
- docs/architecture.md
|
346
344
|
- docs/configuring_omnibus.md
|
@@ -356,7 +354,6 @@ files:
|
|
356
354
|
- docs/waits.md
|
357
355
|
- docs/what_tests_can_be_run.md
|
358
356
|
- exe/gitlab-qa
|
359
|
-
- exe/gitlab-qa-report
|
360
357
|
- fixtures/ldap/1_add_nodes.ldif
|
361
358
|
- fixtures/ldap/2_add_users.ldif
|
362
359
|
- fixtures/ldap/3_add_groups.ldif
|
@@ -394,24 +391,6 @@ files:
|
|
394
391
|
- lib/gitlab/qa/docker/engine.rb
|
395
392
|
- lib/gitlab/qa/docker/volumes.rb
|
396
393
|
- lib/gitlab/qa/release.rb
|
397
|
-
- lib/gitlab/qa/report/base_test_results.rb
|
398
|
-
- lib/gitlab/qa/report/find_set_dri.rb
|
399
|
-
- lib/gitlab/qa/report/generate_test_session.rb
|
400
|
-
- lib/gitlab/qa/report/gitlab_issue_client.rb
|
401
|
-
- lib/gitlab/qa/report/gitlab_issue_dry_client.rb
|
402
|
-
- lib/gitlab/qa/report/j_unit_test_results.rb
|
403
|
-
- lib/gitlab/qa/report/json_test_results.rb
|
404
|
-
- lib/gitlab/qa/report/prepare_stage_reports.rb
|
405
|
-
- lib/gitlab/qa/report/relate_failure_issue.rb
|
406
|
-
- lib/gitlab/qa/report/report_as_issue.rb
|
407
|
-
- lib/gitlab/qa/report/report_results.rb
|
408
|
-
- lib/gitlab/qa/report/results_in_issues.rb
|
409
|
-
- lib/gitlab/qa/report/results_in_testcases.rb
|
410
|
-
- lib/gitlab/qa/report/results_reporter_shared.rb
|
411
|
-
- lib/gitlab/qa/report/summary_table.rb
|
412
|
-
- lib/gitlab/qa/report/test_result.rb
|
413
|
-
- lib/gitlab/qa/report/update_screenshot_path.rb
|
414
|
-
- lib/gitlab/qa/reporter.rb
|
415
394
|
- lib/gitlab/qa/runner.rb
|
416
395
|
- lib/gitlab/qa/runtime/env.rb
|
417
396
|
- lib/gitlab/qa/runtime/logger.rb
|
@@ -425,7 +404,6 @@ files:
|
|
425
404
|
- lib/gitlab/qa/runtime/omnibus_configurations/packages.rb
|
426
405
|
- lib/gitlab/qa/runtime/omnibus_configurations/registry_object_storage.rb
|
427
406
|
- lib/gitlab/qa/runtime/scenario.rb
|
428
|
-
- lib/gitlab/qa/runtime/token_finder.rb
|
429
407
|
- lib/gitlab/qa/scenario/actable.rb
|
430
408
|
- lib/gitlab/qa/scenario/cli_commands.rb
|
431
409
|
- lib/gitlab/qa/scenario/template.rb
|
@@ -479,7 +457,6 @@ files:
|
|
479
457
|
- lib/gitlab/qa/service/cluster_provider/base.rb
|
480
458
|
- lib/gitlab/qa/service/cluster_provider/k3d.rb
|
481
459
|
- lib/gitlab/qa/service/kubernetes_cluster.rb
|
482
|
-
- lib/gitlab/qa/slack/post_to_slack.rb
|
483
460
|
- lib/gitlab/qa/support/config_scripts.rb
|
484
461
|
- lib/gitlab/qa/support/get_request.rb
|
485
462
|
- lib/gitlab/qa/support/gitlab_upgrade_path.rb
|
@@ -488,18 +465,6 @@ files:
|
|
488
465
|
- lib/gitlab/qa/support/invalid_response_error.rb
|
489
466
|
- lib/gitlab/qa/support/shell_command.rb
|
490
467
|
- lib/gitlab/qa/support/shellout.rb
|
491
|
-
- lib/gitlab/qa/system_logs/finders/json_log_finder.rb
|
492
|
-
- lib/gitlab/qa/system_logs/finders/rails/api_log_finder.rb
|
493
|
-
- lib/gitlab/qa/system_logs/finders/rails/application_log_finder.rb
|
494
|
-
- lib/gitlab/qa/system_logs/finders/rails/exception_log_finder.rb
|
495
|
-
- lib/gitlab/qa/system_logs/finders/rails/graphql_log_finder.rb
|
496
|
-
- lib/gitlab/qa/system_logs/log_types/log.rb
|
497
|
-
- lib/gitlab/qa/system_logs/log_types/rails/api_log.rb
|
498
|
-
- lib/gitlab/qa/system_logs/log_types/rails/application_log.rb
|
499
|
-
- lib/gitlab/qa/system_logs/log_types/rails/exception_log.rb
|
500
|
-
- lib/gitlab/qa/system_logs/log_types/rails/graphql_log.rb
|
501
|
-
- lib/gitlab/qa/system_logs/shared_fields.rb
|
502
|
-
- lib/gitlab/qa/system_logs/system_logs_formatter.rb
|
503
468
|
- lib/gitlab/qa/test_logger.rb
|
504
469
|
- lib/gitlab/qa/version.rb
|
505
470
|
- scripts/build-package-and-test-env
|
data/bin/slack
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
# Sends Slack notification MSG to CI_SLACK_WEBHOOK_URL (which needs to be set).
|
3
|
-
# ICON_EMOJI needs to be set to an icon emoji name (without the `:` around it).
|
4
|
-
|
5
|
-
CHANNEL=$1
|
6
|
-
MSG=$2
|
7
|
-
ICON_EMOJI=$3
|
8
|
-
|
9
|
-
if [ -z "$CHANNEL" ] || [ -z "$CI_SLACK_WEBHOOK_URL" ] || [ -z "$MSG" ] || [ -z "$ICON_EMOJI" ]; then
|
10
|
-
echo "Missing argument(s) - Use: $0 channel message icon_emoji"
|
11
|
-
echo "and set CI_SLACK_WEBHOOK_URL environment variable."
|
12
|
-
else
|
13
|
-
curl -X POST --data-urlencode 'payload={"channel": "#'"$CHANNEL"'", "username": "GitLab QA Bot", "text": "'"$MSG"'", "icon_emoji": "'":$ICON_EMOJI:"'"}' "$CI_SLACK_WEBHOOK_URL"
|
14
|
-
fi
|
data/exe/gitlab-qa-report
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Gitlab
|
4
|
-
module QA
|
5
|
-
module Report
|
6
|
-
class BaseTestResults
|
7
|
-
include Enumerable
|
8
|
-
|
9
|
-
attr_reader :path
|
10
|
-
|
11
|
-
def initialize(path)
|
12
|
-
@path = path
|
13
|
-
@results = parse
|
14
|
-
@testcases = process
|
15
|
-
end
|
16
|
-
|
17
|
-
def each(&block)
|
18
|
-
testcases.each(&block)
|
19
|
-
end
|
20
|
-
|
21
|
-
def write
|
22
|
-
raise NotImplementedError
|
23
|
-
end
|
24
|
-
|
25
|
-
private
|
26
|
-
|
27
|
-
attr_reader :results, :testcases
|
28
|
-
|
29
|
-
def parse
|
30
|
-
raise NotImplementedError
|
31
|
-
end
|
32
|
-
|
33
|
-
def process
|
34
|
-
raise NotImplementedError
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'json'
|
4
|
-
|
5
|
-
module Gitlab
|
6
|
-
module QA
|
7
|
-
module Report
|
8
|
-
module FindSetDri
|
9
|
-
def set_dri_via_group(product_group, test)
|
10
|
-
parse_json_with_sets
|
11
|
-
fetch_stage_sets(test)
|
12
|
-
|
13
|
-
return @sets.sample['username'] if @stage_sets.empty?
|
14
|
-
|
15
|
-
fetch_group_sets(product_group)
|
16
|
-
|
17
|
-
if @group_sets.empty?
|
18
|
-
@stage_sets.sample['username']
|
19
|
-
else
|
20
|
-
@group_sets.sample['username']
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
def parse_json_with_sets
|
27
|
-
response = Support::HttpRequest.make_http_request(
|
28
|
-
url: 'https://gitlab-org.gitlab.io/gitlab-roulette/roulette.json'
|
29
|
-
)
|
30
|
-
@sets = JSON.parse(response.body).select { |user| user['role'].include?('software-engineer-in-test') }
|
31
|
-
end
|
32
|
-
|
33
|
-
def fetch_stage_sets(test)
|
34
|
-
@stage_sets = @sets.select { |user| user['role'].include?(test.stage.split("_").map(&:capitalize).join(" ")) }
|
35
|
-
end
|
36
|
-
|
37
|
-
def fetch_group_sets(product_group)
|
38
|
-
@group_sets = @stage_sets.select { |user| user['role'].include?(product_group.split("_").map { |word| word == 'and' ? word : word.capitalize }.join(" ")) }
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|