gitlab-qa 6.15.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a196452581ca78bf81e38487d2563675d1f1afce26754e6ae14f754c9386bac8
4
- data.tar.gz: 3e6f876da229512eb72d93a98e5affc28c809c4e01b0fadf2dcd13a1e743ba12
3
+ metadata.gz: 12907bedff5302d7716d94e3e9cdc5629a03feeccbab102bc3feabf477240355
4
+ data.tar.gz: 224a6d60f40826634d06abc1ebcccaff688fc4e38bf3d6f8a8ab253f289daaaa
5
5
  SHA512:
6
- metadata.gz: 6b87108ae34a262954ea9ce8ef0129383c76a9e73812819286aa35e5ff8200a7763fb048144c7ce316a4c45f7d5d11ffb1349864f3d493e588fde1fbfbaa6516
7
- data.tar.gz: e37a184f29e23f5b02c58365f5628066cbac40158cbd764dfc118bf62176a1cd7690835ede80e8e9a0a5ab8d230dc1e5b509d35d7bb77626fd3b31bc779ed3b7
6
+ metadata.gz: c657c2f07960e1d27e0c0db79730941586ecbe5b5a46b5a66b7059524f200f7b51fa40c1b01083b56649b4791462974da1dc5b1865282897c3a3b62892ad73f7
7
+ data.tar.gz: c16b9320f6b6b388754acdf70e532414fcd1344739aad13f5a64cee2905c9d2c3af79796ac5a3756581cf02d6da893eb560dbe9c682d3c655dba0871c592be7d
@@ -28,20 +28,13 @@ workflow:
28
28
  rules:
29
29
  # For merge requests, create a pipeline.
30
30
  - if: '$CI_MERGE_REQUEST_IID'
31
- # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
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'
35
35
  # For triggers from GitLab MR pipelines (and pipelines from other projects), create a pipeline
36
36
  - if: '$CI_PIPELINE_SOURCE == "pipeline"'
37
37
 
38
- .default-rules:
39
- rules:
40
- - if: '$CI_COMMIT_TAG || $RELEASE'
41
- when: never
42
- - if: '$RELEASE == null && $CI_JOB_NAME =~ /staging/'
43
- when: manual
44
-
45
38
  variables:
46
39
  DOCKER_DRIVER: overlay2
47
40
  DOCKER_HOST: tcp://docker:2375
@@ -53,6 +46,10 @@ variables:
53
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.
54
47
  QA_FAILURES_REPORTER_OPTIONS: ""
55
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"
56
53
 
57
54
  .check-base:
58
55
  stage: check
@@ -84,14 +81,18 @@ rspec:
84
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=$?
85
82
  - exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
86
83
  - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
87
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
88
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
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
89
86
  - exit $test_run_exit_code
90
87
 
91
88
  .ce-qa:
92
89
  variables:
93
90
  DEFAULT_RELEASE: "CE"
94
91
  rules:
92
+ # Don't run E2E jobs on release pipelines
93
+ - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab-qa" && $RELEASE == null'
94
+ changes: ["lib/**/version.rb"]
95
+ when: never
95
96
  - if: '$CI_COMMIT_TAG || $RELEASE =~ /gitlab-ee/'
96
97
  when: never
97
98
  - if: '$RELEASE == null && $CI_JOB_NAME =~ /quarantine|custom/'
@@ -106,6 +107,10 @@ rspec:
106
107
  variables:
107
108
  DEFAULT_RELEASE: "EE"
108
109
  rules:
110
+ # Don't run E2E jobs on release pipelines
111
+ - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab-qa" && $RELEASE == null'
112
+ changes: ["lib/**/version.rb"]
113
+ when: never
109
114
  - if: '$CI_COMMIT_TAG || $RELEASE =~ /gitlab-ce/'
110
115
  when: never
111
116
  - if: '$RELEASE == null && $CI_JOB_NAME =~ /quarantine|custom/'
@@ -117,7 +122,15 @@ rspec:
117
122
  - if: '$RELEASE == null || $RELEASE =~ /gitlab-ee/ || $CI_MERGE_REQUEST_ID || $CI_COMMIT_REF_NAME == "master"'
118
123
 
119
124
  .only-qa:
120
- extends: .default-rules
125
+ rules:
126
+ # Don't run E2E jobs on release pipelines
127
+ - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab-qa" && $RELEASE == null'
128
+ changes: ["lib/**/version.rb"]
129
+ when: never
130
+ - if: '$CI_COMMIT_TAG || $RELEASE'
131
+ when: never
132
+ - if: '$RELEASE == null && $CI_JOB_NAME =~ /staging/'
133
+ when: manual
121
134
 
122
135
  .high-capacity:
123
136
  tags:
@@ -323,8 +336,8 @@ ce:update:
323
336
  script:
324
337
  - exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
325
338
  - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
326
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
327
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
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
328
341
  - exit $test_run_exit_code
329
342
  extends:
330
343
  - .test
@@ -338,8 +351,8 @@ ce:update-quarantine:
338
351
  script:
339
352
  - exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
340
353
  - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
341
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
342
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
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
343
356
  - exit $test_run_exit_code
344
357
  extends:
345
358
  - .test
@@ -352,8 +365,8 @@ ee:update:
352
365
  script:
353
366
  - exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
354
367
  - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
355
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
356
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
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
357
370
  - exit $test_run_exit_code
358
371
  extends:
359
372
  - .test
@@ -367,8 +380,8 @@ ee:update-quarantine:
367
380
  script:
368
381
  - exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
369
382
  - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
370
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
371
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
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
372
385
  - exit $test_run_exit_code
373
386
  extends:
374
387
  - .test
@@ -459,7 +472,6 @@ ee:mattermost-quarantine:
459
472
  ee:geo:
460
473
  extends:
461
474
  - .test
462
- - .high-capacity
463
475
  - .ee-qa
464
476
  - .rspec-report-opts
465
477
  variables:
@@ -468,7 +480,6 @@ ee:geo:
468
480
  ee:geo-quarantine:
469
481
  extends:
470
482
  - .test
471
- - .high-capacity
472
483
  - .ee-qa
473
484
  - .quarantine
474
485
  - .rspec-report-opts
@@ -939,7 +950,7 @@ staging:
939
950
  generate_test_session:
940
951
  stage: report
941
952
  rules:
942
- - if: '$TOP_UPSTREAM_SOURCE_JOB && $TOP_UPSTREAM_SOURCE_REF == "master"'
953
+ - if: '$TOP_UPSTREAM_SOURCE_JOB && $TOP_UPSTREAM_SOURCE_REF == $TOP_UPSTREAM_DEFAULT_BRANCH'
943
954
  when: always
944
955
  - if: '$TOP_UPSTREAM_SOURCE_JOB =~ /\Ahttps:\/\/ops.gitlab.net\//'
945
956
  when: always
@@ -988,7 +999,7 @@ notify_slack:
988
999
  rules:
989
1000
  - if: '$TOP_UPSTREAM_SOURCE_JOB && $NOTIFY_CHANNEL'
990
1001
  when: on_failure
991
- - if: '$TOP_UPSTREAM_SOURCE_JOB && $TOP_UPSTREAM_SOURCE_REF == "master"'
1002
+ - if: '$TOP_UPSTREAM_SOURCE_JOB && $TOP_UPSTREAM_SOURCE_REF == $TOP_UPSTREAM_DEFAULT_BRANCH'
992
1003
  when: on_failure
993
1004
  script:
994
1005
  - export RELEASE=${TOP_UPSTREAM_SOURCE_REF:-$RELEASE}
@@ -27,7 +27,7 @@ module Gitlab
27
27
  # rubocop:enable Metrics/AbcSize
28
28
 
29
29
  def generate_description(tests)
30
- <<~MARKDOWN
30
+ <<~MARKDOWN.rstrip
31
31
  ## Session summary
32
32
 
33
33
  * Deploy version: #{Runtime::Env.deploy_version}
@@ -39,9 +39,7 @@ module Gitlab
39
39
 
40
40
  #{generate_stages_listing(tests)}
41
41
 
42
- ## Release QA issue
43
-
44
- * #{Runtime::Env.qa_issue_url}
42
+ #{generate_qa_issue_relation}
45
43
  MARKDOWN
46
44
  end
47
45
 
@@ -229,6 +227,18 @@ module Gitlab
229
227
  '-'
230
228
  end
231
229
  end
230
+
231
+ def generate_qa_issue_relation
232
+ return unless Runtime::Env.qa_issue_url
233
+
234
+ <<~MARKDOWN.chomp
235
+ ## Release QA issue
236
+
237
+ * #{Runtime::Env.qa_issue_url}
238
+
239
+ /relate #{Runtime::Env.qa_issue_url}
240
+ MARKDOWN
241
+ end
232
242
  end
233
243
  end
234
244
  end
@@ -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 == 'master'
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,
@@ -34,7 +34,10 @@ module Gitlab
34
34
  # /qa/specs/features/ee/api/<stage>
35
35
  # /qa/specs/features/ee/browser_ui/<stage>
36
36
  # For now we assume the Stage is whatever follows api/ or browser_ui/
37
- stage = strip_number_prefix(test['file'].match(%r{(api|browser_ui)/([a-z0-9_]+)}i)[2])
37
+ test_path_match = test['file'].match(%r{(api|browser_ui)/([a-z0-9_]+)}i)
38
+ next unless test_path_match
39
+
40
+ stage = strip_number_prefix(test_path_match[2])
38
41
  testcases[stage] = [] unless testcases.key?(stage)
39
42
  testcases[stage] << test
40
43
  end
@@ -10,7 +10,7 @@ module Gitlab
10
10
  # Uses the API to create or update GitLab issues with the results of tests from RSpec report files.
11
11
  class RelateFailureIssue < ReportAsIssue
12
12
  DEFAULT_MAX_DIFF_RATIO_FOR_DETECTION = 0.05
13
- STACKTRACE_REGEX = %r{### Stack trace\s*(```)\s*.*(Failure/Error:.+)(\1)}m.freeze
13
+ STACKTRACE_REGEX = %r{### Stack trace\s*(```)\s*(?!.*Failure/Error:)?(.+)(\1)}m.freeze
14
14
  NEW_ISSUE_LABELS = Set.new(%w[QA Quality test failure::investigating priority::2]).freeze
15
15
 
16
16
  MultipleIssuesFound = Class.new(StandardError)
@@ -85,7 +85,8 @@ module Gitlab
85
85
  next unless relevant_issue_stacktrace
86
86
 
87
87
  distance = ld.call(first_test_failure_stacktrace, relevant_issue_stacktrace)
88
- diff_ratio = (distance.to_f / first_test_failure_stacktrace.size).round(3)
88
+ diff_ratio = distance.zero? ? 0.0 : (distance.to_f / first_test_failure_stacktrace.size).round(3)
89
+
89
90
  if diff_ratio <= max_diff_ratio
90
91
  puts " => [DEBUG] Issue #{issue} has an acceptable diff ratio of #{(diff_ratio * 100).round(2)}%."
91
92
  # The `Gitlab::ObjectifiedHash` class overrides `#hash` which is used by `Hash#[]=` to compute the hash key.
@@ -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', 'master'
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, master, staging, canary, production, preprod, and MRs
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 master
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
- 'master'
165
+ QA::Runtime::Env.default_branch
161
166
  end
162
167
  else
163
168
  ci_project_name
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '6.15.0'.freeze
3
+ VERSION = '6.16.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.15.0
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-01 00:00:00.000000000 Z
11
+ date: 2020-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control