gitlab-qa 14.7.0 → 14.8.1
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 +8 -4
- data/Gemfile.lock +1 -1
- data/lib/gitlab/qa/component/specs.rb +29 -18
- data/lib/gitlab/qa/runtime/env.rb +1 -0
- data/lib/gitlab/qa/scenario/test/omnibus/update_from_previous.rb +2 -0
- 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: 6315dcd0fabc755ecfb2b64cb7ffc5e73cd77fbba288c8f89be93142ac7174e1
|
4
|
+
data.tar.gz: 557ef329ee26120c50c35f8314853e8d0cb371b52ceeccde7e26e8997b170dd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbbf2dc9b2c8e5a42a98186e360d1da4166dbe1a24de833a2039e171f1ce06eaaf180c757ed8792d2cfbe9ec39e13602821691e761b186af0213e97239742487
|
7
|
+
data.tar.gz: 44d34468cb7f791ba78648ee726c781de63d1e2096f4f9f444761be0c7d8c006ef0712e6a1aa6b1735d476bdaa0bb46156ad339e81659fcf343e947b9aacf63e
|
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-
|
13
|
+
job_image: "${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-${BUNDLER_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}:bundler
|
23
|
+
image: ${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-${BUNDLER_VERSION}
|
24
24
|
tags:
|
25
25
|
- gitlab-org
|
26
26
|
cache:
|
@@ -41,8 +41,10 @@ workflow:
|
|
41
41
|
- if: '$CI_PIPELINE_SOURCE == "web"'
|
42
42
|
|
43
43
|
variables:
|
44
|
-
DEBIAN_VERSION:
|
45
|
-
|
44
|
+
DEBIAN_VERSION: bookworm
|
45
|
+
DOCKER_VERSION: "24.0.5"
|
46
|
+
BUNDLER_VERSION: "2.5"
|
47
|
+
RUBY_VERSION: "3.1"
|
46
48
|
BUNDLE_PATH: vendor
|
47
49
|
BUNDLE_SILENCE_ROOT_WARNING: "true"
|
48
50
|
BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true"
|
@@ -142,6 +144,8 @@ package-and-test:
|
|
142
144
|
variables:
|
143
145
|
- RUBY_VERSION
|
144
146
|
- DEBIAN_VERSION
|
147
|
+
- DOCKER_VERSION
|
148
|
+
- BUNDLER_VERSION
|
145
149
|
trigger:
|
146
150
|
strategy: depend
|
147
151
|
forward:
|
data/Gemfile.lock
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
# rubocop:disable Metrics/AbcSize
|
4
4
|
|
5
5
|
require 'securerandom'
|
6
|
+
require 'active_support/core_ext/array/grouping'
|
6
7
|
|
7
8
|
module Gitlab
|
8
9
|
module QA
|
@@ -23,7 +24,8 @@ module Gitlab
|
|
23
24
|
:runner_network,
|
24
25
|
:hostname,
|
25
26
|
:additional_hosts,
|
26
|
-
:retry_failed_specs
|
27
|
+
:retry_failed_specs,
|
28
|
+
:infer_qa_image_from_release
|
27
29
|
|
28
30
|
def initialize
|
29
31
|
@docker = Docker::Engine.new(stream_output: true) # stream test output directly instead of through logger
|
@@ -155,18 +157,14 @@ module Gitlab
|
|
155
157
|
def args_with_flags(feature_flag_set, retry_process: false)
|
156
158
|
return args if feature_flag_set.empty? && !retry_process
|
157
159
|
|
158
|
-
run_args =
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
else
|
167
|
-
run_args.push("--", "--only-failures")
|
168
|
-
end
|
169
|
-
end
|
160
|
+
run_args = if !retry_process
|
161
|
+
args.dup
|
162
|
+
elsif args.include?("--")
|
163
|
+
qa_args, rspec_args = args.split("--")
|
164
|
+
[*qa_args, "--"] + args_without_spec_arguments(rspec_args).push("--only-failures")
|
165
|
+
else
|
166
|
+
args.dup.push("--", "--only-failures")
|
167
|
+
end
|
170
168
|
|
171
169
|
return run_args if feature_flag_set.empty?
|
172
170
|
|
@@ -174,16 +172,29 @@ module Gitlab
|
|
174
172
|
run_args.insert(1, *feature_flag_set)
|
175
173
|
end
|
176
174
|
|
175
|
+
# Remove particular spec argument like specific spec/folder or specific tags
|
176
|
+
#
|
177
|
+
# @param [Array] rspec_args
|
178
|
+
# @return [Array]
|
179
|
+
def args_without_spec_arguments(rspec_args)
|
180
|
+
arg_pairs = rspec_args.flatten.each_with_object([]) do |arg, new_args|
|
181
|
+
next new_args.push([arg]) if new_args.last.nil? || arg.start_with?("--") || new_args.last.size == 2
|
182
|
+
|
183
|
+
new_args.last.push(arg)
|
184
|
+
end
|
185
|
+
|
186
|
+
arg_pairs.reject { |pair| pair.first == "--tag" || !pair.first.start_with?("--") }.flatten
|
187
|
+
end
|
188
|
+
|
177
189
|
def skip_tests?
|
178
190
|
Runtime::Scenario.attributes.include?(:run_tests) && !Runtime::Scenario.run_tests
|
179
191
|
end
|
180
192
|
|
181
193
|
def qa_image
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
end
|
194
|
+
infered_qa_image = "#{release.qa_image}:#{release.qa_tag}"
|
195
|
+
return infered_qa_image if infer_qa_image_from_release || !Runtime::Scenario.attributes.include?(:qa_image)
|
196
|
+
|
197
|
+
Runtime::Scenario.qa_image
|
187
198
|
end
|
188
199
|
|
189
200
|
# Adds volumes to the volumes hash if the relevant host paths exist
|
@@ -106,6 +106,7 @@ module Gitlab
|
|
106
106
|
'CI_NODE_TOTAL' => :ci_node_total,
|
107
107
|
'CI_PROJECT_NAME' => :ci_project_name,
|
108
108
|
'CI_PROJECT_PATH' => :ci_project_path,
|
109
|
+
'CI_PROJECT_PATH_SLUG' => :ci_project_path_slug,
|
109
110
|
'CI_PIPELINE_SOURCE' => :ci_pipeline_source,
|
110
111
|
'CI_PIPELINE_ID' => :ci_pipeline_id,
|
111
112
|
'CI_PIPELINE_URL' => :ci_pipeline_url,
|
@@ -114,6 +114,8 @@ module Gitlab
|
|
114
114
|
# do not generate reports and metrics artifacts for non release runs or retry failures
|
115
115
|
specs.env = { 'QA_GENERATE_ALLURE_REPORT' => false, 'QA_SAVE_TEST_METRICS' => false }
|
116
116
|
specs.retry_failed_specs = false
|
117
|
+
# if qa-image was set explicitly, make sure it is not used on initial run for release
|
118
|
+
specs.infer_qa_image_from_release = true
|
117
119
|
end
|
118
120
|
rescue Support::ShellCommand::StatusError => e
|
119
121
|
if release == current_release # only fail on current release
|
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: 14.
|
4
|
+
version: 14.8.1
|
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-04-
|
11
|
+
date: 2024-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|