gitlab-qa 6.15.4 → 6.16.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-ci.yml +17 -13
- data/lib/gitlab/qa/report/gitlab_issue_client.rb +1 -1
- data/lib/gitlab/qa/report/report_as_issue.rb +5 -5
- data/lib/gitlab/qa/runtime/env.rb +6 -1
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12907bedff5302d7716d94e3e9cdc5629a03feeccbab102bc3feabf477240355
|
|
4
|
+
data.tar.gz: 224a6d60f40826634d06abc1ebcccaff688fc4e38bf3d6f8a8ab253f289daaaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c657c2f07960e1d27e0c0db79730941586ecbe5b5a46b5a66b7059524f200f7b51fa40c1b01083b56649b4791462974da1dc5b1865282897c3a3b62892ad73f7
|
|
7
|
+
data.tar.gz: c16b9320f6b6b388754acdf70e532414fcd1344739aad13f5a64cee2905c9d2c3af79796ac5a3756581cf02d6da893eb560dbe9c682d3c655dba0871c592be7d
|
data/.gitlab-ci.yml
CHANGED
|
@@ -28,7 +28,7 @@ workflow:
|
|
|
28
28
|
rules:
|
|
29
29
|
# For merge requests, create a pipeline.
|
|
30
30
|
- if: '$CI_MERGE_REQUEST_IID'
|
|
31
|
-
# For
|
|
31
|
+
# For the default branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
|
|
32
32
|
- if: '$CI_COMMIT_BRANCH == "master"'
|
|
33
33
|
# For tags, create a pipeline.
|
|
34
34
|
- if: '$CI_COMMIT_TAG'
|
|
@@ -46,6 +46,10 @@ variables:
|
|
|
46
46
|
# The --dry-run or --max-diff-ratio option can be set to modify the behavior of `exe/gitlab-qa-report --relate-failure-issue` without releasing a new gem version.
|
|
47
47
|
QA_FAILURES_REPORTER_OPTIONS: ""
|
|
48
48
|
QA_TESTCASE_SESSIONS_PROJECT: "gitlab-org/quality/testcase-sessions"
|
|
49
|
+
# QA_DEFAULT_BRANCH is the default branch name of the instance under test.
|
|
50
|
+
QA_DEFAULT_BRANCH: "master"
|
|
51
|
+
# TOP_UPSTREAM_DEFAULT_BRANCH is the default branch name of the original project that triggered a pipeline in this project.
|
|
52
|
+
TOP_UPSTREAM_DEFAULT_BRANCH: "master"
|
|
49
53
|
|
|
50
54
|
.check-base:
|
|
51
55
|
stage: check
|
|
@@ -77,8 +81,8 @@ rspec:
|
|
|
77
81
|
- exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
|
78
82
|
- exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
|
|
79
83
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
|
80
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
81
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
84
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
|
85
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --relate-failure-issue "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_FAILURES_REPORTING_PROJECT" $QA_FAILURES_REPORTER_OPTIONS || true; fi
|
|
82
86
|
- exit $test_run_exit_code
|
|
83
87
|
|
|
84
88
|
.ce-qa:
|
|
@@ -332,8 +336,8 @@ ce:update:
|
|
|
332
336
|
script:
|
|
333
337
|
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
|
334
338
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
|
335
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
336
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
339
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
|
340
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --relate-failure-issue "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_FAILURES_REPORTING_PROJECT" $QA_FAILURES_REPORTER_OPTIONS || true; fi
|
|
337
341
|
- exit $test_run_exit_code
|
|
338
342
|
extends:
|
|
339
343
|
- .test
|
|
@@ -347,8 +351,8 @@ ce:update-quarantine:
|
|
|
347
351
|
script:
|
|
348
352
|
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
|
349
353
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
|
350
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
351
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
354
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
|
355
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --relate-failure-issue "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_FAILURES_REPORTING_PROJECT" $QA_FAILURES_REPORTER_OPTIONS || true; fi
|
|
352
356
|
- exit $test_run_exit_code
|
|
353
357
|
extends:
|
|
354
358
|
- .test
|
|
@@ -361,8 +365,8 @@ ee:update:
|
|
|
361
365
|
script:
|
|
362
366
|
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
|
363
367
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
|
364
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
365
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
368
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
|
369
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --relate-failure-issue "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_FAILURES_REPORTING_PROJECT" $QA_FAILURES_REPORTER_OPTIONS || true; fi
|
|
366
370
|
- exit $test_run_exit_code
|
|
367
371
|
extends:
|
|
368
372
|
- .test
|
|
@@ -376,8 +380,8 @@ ee:update-quarantine:
|
|
|
376
380
|
script:
|
|
377
381
|
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
|
378
382
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
|
379
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
380
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" ==
|
|
383
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
|
|
384
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --relate-failure-issue "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_FAILURES_REPORTING_PROJECT" $QA_FAILURES_REPORTER_OPTIONS || true; fi
|
|
381
385
|
- exit $test_run_exit_code
|
|
382
386
|
extends:
|
|
383
387
|
- .test
|
|
@@ -946,7 +950,7 @@ staging:
|
|
|
946
950
|
generate_test_session:
|
|
947
951
|
stage: report
|
|
948
952
|
rules:
|
|
949
|
-
- if: '$TOP_UPSTREAM_SOURCE_JOB && $TOP_UPSTREAM_SOURCE_REF ==
|
|
953
|
+
- if: '$TOP_UPSTREAM_SOURCE_JOB && $TOP_UPSTREAM_SOURCE_REF == $TOP_UPSTREAM_DEFAULT_BRANCH'
|
|
950
954
|
when: always
|
|
951
955
|
- if: '$TOP_UPSTREAM_SOURCE_JOB =~ /\Ahttps:\/\/ops.gitlab.net\//'
|
|
952
956
|
when: always
|
|
@@ -995,7 +999,7 @@ notify_slack:
|
|
|
995
999
|
rules:
|
|
996
1000
|
- if: '$TOP_UPSTREAM_SOURCE_JOB && $NOTIFY_CHANNEL'
|
|
997
1001
|
when: on_failure
|
|
998
|
-
- if: '$TOP_UPSTREAM_SOURCE_JOB && $TOP_UPSTREAM_SOURCE_REF ==
|
|
1002
|
+
- if: '$TOP_UPSTREAM_SOURCE_JOB && $TOP_UPSTREAM_SOURCE_REF == $TOP_UPSTREAM_DEFAULT_BRANCH'
|
|
999
1003
|
when: on_failure
|
|
1000
1004
|
script:
|
|
1001
1005
|
- export RELEASE=${TOP_UPSTREAM_SOURCE_REF:-$RELEASE}
|
|
@@ -110,7 +110,7 @@ module Gitlab
|
|
|
110
110
|
channel = pipeline == "canary" ? "qa-production" : "qa-#{pipeline}"
|
|
111
111
|
error_msg = warn_exception(e)
|
|
112
112
|
|
|
113
|
-
return unless QA::Runtime::Env.ci_commit_ref_name ==
|
|
113
|
+
return unless QA::Runtime::Env.ci_commit_ref_name == QA::Runtime::Env.default_branch
|
|
114
114
|
|
|
115
115
|
slack_options = {
|
|
116
116
|
channel: channel,
|
|
@@ -112,7 +112,7 @@ module Gitlab
|
|
|
112
112
|
"found:#{pipeline}.gitlab.com"
|
|
113
113
|
when 'preprod'
|
|
114
114
|
'found:pre.gitlab.com'
|
|
115
|
-
when 'staging-orchestrated', 'nightly',
|
|
115
|
+
when 'staging-orchestrated', 'nightly', QA::Runtime::Env.default_branch
|
|
116
116
|
"found:#{pipeline}"
|
|
117
117
|
else
|
|
118
118
|
raise "No `found:*` label for the `#{pipeline}` pipeline!"
|
|
@@ -147,14 +147,14 @@ module Gitlab
|
|
|
147
147
|
# Gets the name of the pipeline the test was run in, to be used as the key of a scoped label
|
|
148
148
|
#
|
|
149
149
|
# Tests can be run in several pipelines:
|
|
150
|
-
# gitlab-qa, nightly,
|
|
150
|
+
# gitlab-qa, nightly, staging, canary, production, preprod, MRs, and the default branch (master/main)
|
|
151
151
|
#
|
|
152
152
|
# Some of those run in their own project, so CI_PROJECT_NAME is the name we need. Those are:
|
|
153
153
|
# nightly, staging, canary, production, and preprod
|
|
154
154
|
#
|
|
155
|
-
# MR, master, and gitlab-qa tests run in gitlab-qa, but we only want to report tests run on
|
|
156
|
-
# because the other pipelines will be monitored by the author of the MR that triggered them.
|
|
157
|
-
# So we assume that we're reporting a master pipeline if the project name is 'gitlab-qa'.
|
|
155
|
+
# MR, master/main, and gitlab-qa tests run in gitlab-qa, but we only want to report tests run on
|
|
156
|
+
# master/main because the other pipelines will be monitored by the author of the MR that triggered them.
|
|
157
|
+
# So we assume that we're reporting a master/main pipeline if the project name is 'gitlab-qa'.
|
|
158
158
|
|
|
159
159
|
@pipeline ||= Runtime::Env.pipeline_from_project_name
|
|
160
160
|
end
|
|
@@ -44,6 +44,7 @@ module Gitlab
|
|
|
44
44
|
'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
|
|
45
45
|
'QA_COOKIES' => :qa_cookie,
|
|
46
46
|
'QA_DEBUG' => :qa_debug,
|
|
47
|
+
'QA_DEFAULT_BRANCH' => :qa_default_branch,
|
|
47
48
|
'QA_LOG_PATH' => :qa_log_path,
|
|
48
49
|
'QA_CAN_TEST_ADMIN_FEATURES' => :qa_can_test_admin_features,
|
|
49
50
|
'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
|
|
@@ -100,6 +101,10 @@ module Gitlab
|
|
|
100
101
|
end
|
|
101
102
|
end
|
|
102
103
|
|
|
104
|
+
def default_branch
|
|
105
|
+
ENV['QA_DEFAULT_BRANCH'] || 'master'
|
|
106
|
+
end
|
|
107
|
+
|
|
103
108
|
def gitlab_username
|
|
104
109
|
ENV['GITLAB_USERNAME'] || 'gitlab-qa'
|
|
105
110
|
end
|
|
@@ -157,7 +162,7 @@ module Gitlab
|
|
|
157
162
|
if ENV['TOP_UPSTREAM_SOURCE_JOB'].to_s.start_with?('https://ops.gitlab.net')
|
|
158
163
|
'staging-orchestrated'
|
|
159
164
|
else
|
|
160
|
-
|
|
165
|
+
QA::Runtime::Env.default_branch
|
|
161
166
|
end
|
|
162
167
|
else
|
|
163
168
|
ci_project_name
|
data/lib/gitlab/qa/version.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: 6.
|
|
4
|
+
version: 6.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Grzegorz Bizon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-12-
|
|
11
|
+
date: 2020-12-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|