gitlab-qa 7.17.1 → 7.18.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: ff50dfd062e99694daf1ff16ba5a2dc90009e115ae7135daefad599d10cf71d3
4
- data.tar.gz: 65d3e0b16cfb76564db771428aa8ed8a308ef2cabb4573cefe39f418c81dfce2
3
+ metadata.gz: 879e5a3fcce24d31675bfc149497fbf8bcff3a30c7ad0e130fe8c0c5dff066bf
4
+ data.tar.gz: 00c054d0c7e8b7835dddbbbb7f984add3e7bb6c5373e1818100a1ad1cc0d4dfa
5
5
  SHA512:
6
- metadata.gz: 7270725434c4cdf1fa7b0630635087b8a9d4871929f705a97980b206a3a9cbe44c874974ae0fef215eb2521fa28c8f7bae866ec2e39ac13d16db95750bf82cb3
7
- data.tar.gz: 7eb6bff95f128d1cf7a8ca99210cb8066a49871d4e676c22053e37e4137229a6d58e70c944267ee7a51ada4a803c3d00adbbc2c4b5c8083bbc3c79a068725795
6
+ metadata.gz: ce337cb8932389b8911f53c81d31d9ef53f999beb3bb33a39834fc33166a1bc682fe211b41f8128090a4553dc11049d36ea2e94789f8a850ad28a36ebabceec2
7
+ data.tar.gz: 2257bba9c635c0cff8998df076a2560dd2c8c07a51536e24414a9bdccebe1a1342bed8fba8a2ecaae7baa5e3743ec554f246ff5b06407c656396d2eff04f934a
data/.gitlab-ci.yml CHANGED
@@ -77,7 +77,7 @@ rspec:
77
77
  when: always
78
78
  expire_in: 10d
79
79
  paths:
80
- - ./gitlab-qa-run-*
80
+ - gitlab-qa-run-*
81
81
  reports:
82
82
  junit: gitlab-qa-run-*/**/rspec-*.xml
83
83
  script:
@@ -125,12 +125,6 @@ rspec:
125
125
  - 7gb
126
126
  - triggered-packages
127
127
 
128
- .knapsack-variables:
129
- variables:
130
- KNAPSACK_REPORT_PATH: "knapsack/master_report.json"
131
- KNAPSACK_TEST_FILE_PATTERN: "qa/specs/features/**/*_spec.rb"
132
- KNAPSACK_GENERATE_REPORT: "true"
133
-
134
128
  .rspec-report-opts:
135
129
  variables:
136
130
  FILE_SAFE_JOB_NAME: $(echo $CI_JOB_NAME | sed 's/[ /]/_/g')
@@ -174,7 +168,6 @@ ce:custom-parallel:
174
168
  - .rspec-report-opts
175
169
  - .no-issue-report-script
176
170
  - .ce-variables
177
-
178
171
  allow_failure: true
179
172
  parallel: 10
180
173
 
@@ -195,7 +188,6 @@ ce:instance-parallel:
195
188
  - .test
196
189
  - .high-capacity
197
190
  - .ce-variables
198
- - .knapsack-variables
199
191
  - .rspec-report-opts
200
192
  parallel: 5
201
193
 
@@ -224,7 +216,6 @@ ee:instance-parallel:
224
216
  - .test
225
217
  - .high-capacity
226
218
  - .ee-variables
227
- - .knapsack-variables
228
219
  - .rspec-report-opts
229
220
  parallel: 5
230
221
 
@@ -253,7 +244,6 @@ ce:relative_url-parallel:
253
244
  - .test
254
245
  - .high-capacity
255
246
  - .ce-variables
256
- - .knapsack-variables
257
247
  - .rspec-report-opts
258
248
  parallel: 5
259
249
  variables:
@@ -287,7 +277,6 @@ ee:relative_url-parallel:
287
277
  - .test
288
278
  - .high-capacity
289
279
  - .ee-variables
290
- - .knapsack-variables
291
280
  - .rspec-report-opts
292
281
  parallel: 5
293
282
  variables:
@@ -381,7 +370,6 @@ ce:update-parallel:
381
370
  - .high-capacity
382
371
  - .ce-variables
383
372
  - .rspec-report-opts
384
- - .knapsack-variables
385
373
  - .update-scenario-script
386
374
  parallel: 5
387
375
 
@@ -413,7 +401,6 @@ ee:update-parallel:
413
401
  - .high-capacity
414
402
  - .ee-variables
415
403
  - .rspec-report-opts
416
- - .knapsack-variables
417
404
  - .update-scenario-script
418
405
  parallel: 10
419
406
 
@@ -446,7 +433,6 @@ ce:upgrade-parallel:
446
433
  - .test
447
434
  - .high-capacity
448
435
  - .rspec-report-opts
449
- - .knapsack-variables
450
436
  parallel: 5
451
437
 
452
438
  ce:upgrade:
@@ -549,7 +535,7 @@ ee:service_ping_disabled:
549
535
  variables:
550
536
  QA_SCENARIO: "Test::Integration::ServicePingDisabled"
551
537
 
552
- # Disabling geo jobs temporarily due to https://gitlab.com/gitlab-org/gitlab/-/issues/273063
538
+ # Disabling geo jobs temporarily due to https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/774
553
539
  # ee:geo:
554
540
  # extends:
555
541
  # - .test
@@ -1011,7 +997,6 @@ ce:praefect-parallel:
1011
997
  - .test
1012
998
  - .high-capacity
1013
999
  - .ce-variables
1014
- - .knapsack-variables
1015
1000
  - .rspec-report-opts
1016
1001
  parallel: 5
1017
1002
  variables:
@@ -1048,7 +1033,6 @@ ee:praefect-parallel:
1048
1033
  - .test
1049
1034
  - .high-capacity
1050
1035
  - .ee-variables
1051
- - .knapsack-variables
1052
1036
  - .rspec-report-opts
1053
1037
  parallel: 10
1054
1038
  variables:
@@ -1225,6 +1209,35 @@ ee:large-setup:
1225
1209
  variables:
1226
1210
  QA_RSPEC_TAGS: "--tag can_use_large_setup"
1227
1211
 
1212
+ ee:cloud-activation:
1213
+ before_script:
1214
+ - unset EE_LICENSE
1215
+ - unset GITLAB_QA_FORMLESS_LOGIN_TOKEN
1216
+ - !reference [default, before_script]
1217
+ extends:
1218
+ - .rules:ee-never-when-triggered-by-feature-flag-definition-change
1219
+ - .test
1220
+ - .high-capacity
1221
+ - .ee-variables
1222
+ - .rspec-report-opts
1223
+ variables:
1224
+ QA_SCENARIO: "Test::Integration::CloudActivation"
1225
+
1226
+ ee:cloud-activation-quarantine:
1227
+ before_script:
1228
+ - unset EE_LICENSE
1229
+ - unset GITLAB_QA_FORMLESS_LOGIN_TOKEN
1230
+ - !reference [default, before_script]
1231
+ extends:
1232
+ - .rules:ee-never-when-triggered-by-feature-flag-definition-change
1233
+ - .test
1234
+ - .high-capacity
1235
+ - .ee-variables
1236
+ - .quarantine
1237
+ - .rspec-report-opts
1238
+ variables:
1239
+ QA_SCENARIO: "Test::Integration::CloudActivation"
1240
+
1228
1241
  # This job requires the `GITLAB_QA_ACCESS_TOKEN` and `GITLAB_QA_DEV_ACCESS_TOKEN`
1229
1242
  # variable to be passed when triggered.
1230
1243
  staging:
@@ -1348,9 +1361,17 @@ generate-allure-report:
1348
1361
  - if: '$TOP_UPSTREAM_SOURCE_PROJECT && $TOP_UPSTREAM_SOURCE_SHA'
1349
1362
  when: always
1350
1363
 
1364
+ generate-knapsack-report:
1365
+ extends: .generate-knapsack-report-base
1366
+ image:
1367
+ name: ${QA_IMAGE}
1368
+ stage: report
1369
+
1351
1370
  include:
1352
1371
  - local: .gitlab/ci/*.gitlab-ci.yml
1353
1372
  - project: 'gitlab-org/quality/pipeline-common'
1354
1373
  file: '/ci/gem-release.yml'
1355
1374
  - project: 'gitlab-org/quality/pipeline-common'
1356
1375
  file: '/ci/allure-report.yml'
1376
+ - project: 'gitlab-org/quality/pipeline-common'
1377
+ file: '/ci/knapsack-report.yml'
data/gitlab-qa.gemspec CHANGED
@@ -31,5 +31,6 @@ Gem::Specification.new do |spec|
31
31
  spec.add_runtime_dependency 'gitlab', '~> 4.18.0'
32
32
  spec.add_runtime_dependency 'http', '~> 5.0'
33
33
  spec.add_runtime_dependency 'nokogiri', '~> 1.10'
34
+ spec.add_runtime_dependency 'rainbow', '~> 3.0.0'
34
35
  spec.add_runtime_dependency 'table_print', '1.5.7'
35
36
  end
@@ -108,7 +108,7 @@ module Gitlab
108
108
 
109
109
  def teardown
110
110
  unless teardown?
111
- puts "The orchestrated docker containers have not been removed."
111
+ Runtime::Logger.info("The orchestrated docker containers have not been removed.")
112
112
  docker.ps
113
113
 
114
114
  return
@@ -62,7 +62,7 @@ module Gitlab
62
62
  FileUtils.mkdir_p(host_data_dir)
63
63
 
64
64
  @buckets.each do |bucket|
65
- puts "Creating Minio bucket: #{bucket}"
65
+ Runtime::Logger.info("Creating Minio bucket: #{bucket}")
66
66
  FileUtils.mkdir_p(File.join(host_data_dir, bucket))
67
67
  end
68
68
  end
@@ -17,7 +17,7 @@ module Gitlab
17
17
  end
18
18
 
19
19
  def perform
20
- return puts "Skipping tests." if skip_tests?
20
+ return Runtime::Logger.info("Skipping tests.") if skip_tests?
21
21
 
22
22
  raise ArgumentError unless [suite, release].all?
23
23
 
@@ -25,7 +25,7 @@ module Gitlab
25
25
 
26
26
  @docker.pull(image: qa_image) unless Runtime::Env.skip_pull?
27
27
 
28
- puts "Running test suite `#{suite}` for #{release.project_name}"
28
+ Runtime::Logger.info("Running test suite `#{suite}` for #{release.project_name}")
29
29
 
30
30
  name = "#{release.project_name}-qa-#{SecureRandom.hex(4)}"
31
31
 
@@ -71,7 +71,7 @@ module Gitlab
71
71
  def args_with_flags(args, feature_flag_set)
72
72
  return args if feature_flag_set.empty?
73
73
 
74
- puts "Running with feature flag: #{feature_flag_set.join(' ')}"
74
+ Runtime::Logger.info("Running with feature flag: #{feature_flag_set.join(' ')}")
75
75
 
76
76
  args_with_f = args.dup
77
77
  args_with_f.insert(1, *feature_flag_set)
@@ -1,16 +1,19 @@
1
1
  require 'open3'
2
+ require 'rainbow/refinement'
2
3
 
3
4
  module Gitlab
4
5
  module QA
5
6
  module Docker
6
7
  class Shellout
8
+ using Rainbow
7
9
  StatusError = Class.new(StandardError)
8
10
 
9
11
  def initialize(command)
10
12
  @command = command
11
13
  @output = []
12
14
 
13
- puts "Docker shell command: `#{@command.mask_secrets}`"
15
+ Rainbow.enabled = Runtime::Env.colorized_logs?
16
+ Runtime::Logger.info("Docker shell command: `#{@command.mask_secrets}`".cyan)
14
17
  end
15
18
 
16
19
  def execute! # rubocop:disable Metrics/AbcSize
@@ -28,7 +31,7 @@ module Gitlab
28
31
  end
29
32
 
30
33
  if wait.value.exited? && wait.value.exitstatus.nonzero? # rubocop:disable Style/IfUnlessModifier
31
- raise StatusError, "Docker command `#{@command.mask_secrets}` failed!"
34
+ raise StatusError, "Docker command `#{@command.mask_secrets}` failed!"
32
35
  end
33
36
  end
34
37
 
@@ -1,10 +1,13 @@
1
+ require 'active_support/core_ext/object/blank'
1
2
  require 'securerandom'
3
+ require 'rainbow/refinement'
2
4
 
3
5
  module Gitlab
4
6
  module QA
5
7
  module Runtime
6
8
  module Env
7
9
  extend self
10
+ using Rainbow
8
11
 
9
12
  # Variables that are used in tests and are passed through to the docker container that executes the tests.
10
13
  # These variables should be listed in /docs/what_tests_can_be_run.md#supported-gitlab-environment-variables
@@ -76,6 +79,7 @@ module Gitlab
76
79
  'KNAPSACK_REPORT_PATH' => :knapsack_report_path,
77
80
  'KNAPSACK_TEST_FILE_PATTERN' => :knapsack_test_file_pattern,
78
81
  'KNAPSACK_TEST_DIR' => :knapsack_test_dir,
82
+ 'QA_KNAPSACK_REPORT_GCS_CREDENTIALS' => :qa_knapsack_report_gcs_credentials,
79
83
  'CI' => :ci,
80
84
  'CI_COMMIT_REF_NAME' => :ci_commit_ref_name,
81
85
  'CI_JOB_NAME' => :ci_job_name,
@@ -124,14 +128,15 @@ module Gitlab
124
128
  'GCS_BUCKET_NAME' => :gcs_bucket_name,
125
129
  'SMOKE_ONLY' => :smoke_only,
126
130
  'NO_ADMIN' => :no_admin,
127
- 'CHROME_DISABLE_DEV_SHM' => :chrome_disable_dev_shm
131
+ 'CHROME_DISABLE_DEV_SHM' => :chrome_disable_dev_shm,
132
+ 'COLORIZED_LOGS' => :colorized_logs
128
133
  }.freeze
129
134
 
130
135
  ENV_VARIABLES.each do |env_name, method_name|
131
136
  attr_writer(method_name)
132
137
 
133
138
  define_method(method_name) do
134
- ENV[env_name] || (instance_variable_get("@#{method_name}") if instance_variable_defined?("@#{method_name}"))
139
+ env_var_value_if_defined(env_name) || (instance_variable_get("@#{method_name}") if instance_variable_defined?("@#{method_name}"))
135
140
  end
136
141
  end
137
142
 
@@ -141,36 +146,40 @@ module Gitlab
141
146
  ENV_VARIABLES.each do |name, attribute|
142
147
  # Variables that are overridden in the environment take precedence
143
148
  # over the defaults specified by the QA runtime.
144
- value = env_value_if_defined(name) || send(attribute) # rubocop:disable GitlabSecurity/PublicSend
149
+ value = env_var_name_if_defined(name) || send(attribute) # rubocop:disable GitlabSecurity/PublicSend
145
150
  vars[name] = value if value
146
151
  end
147
152
 
148
153
  vars
149
154
  end
150
155
 
156
+ def debug?
157
+ enabled?(ENV['QA_DEBUG'], default: true)
158
+ end
159
+
151
160
  def default_branch
152
- ENV['QA_DEFAULT_BRANCH'] || 'main'
161
+ env_var_value_if_defined('QA_DEFAULT_BRANCH') || 'main'
153
162
  end
154
163
 
155
164
  def gitlab_availability_timeout
156
- ENV.fetch('GITLAB_QA_AVAILABILITY_TIMEOUT', 360).to_i
165
+ (env_var_value_if_defined('GITLAB_QA_AVAILABILITY_TIMEOUT') || 360).to_i
157
166
  end
158
167
 
159
168
  def gitlab_username
160
- ENV['GITLAB_USERNAME'] || 'gitlab-qa'
169
+ env_var_value_if_defined('GITLAB_USERNAME') || 'gitlab-qa'
161
170
  end
162
171
 
163
172
  def gitlab_dev_username
164
- ENV['GITLAB_DEV_USERNAME'] || 'gitlab-qa-bot'
173
+ env_var_value_if_defined('GITLAB_DEV_USERNAME') || 'gitlab-qa-bot'
165
174
  end
166
175
 
167
176
  def gitlab_api_base
168
- ENV['GITLAB_API_BASE'] || 'https://gitlab.com/api/v4'
177
+ env_var_value_if_defined('GITLAB_API_BASE') || 'https://gitlab.com/api/v4'
169
178
  end
170
179
 
171
180
  def pipeline_from_project_name
172
181
  if ci_project_name.to_s.start_with?('gitlab-qa')
173
- if ENV['TOP_UPSTREAM_SOURCE_JOB'].to_s.start_with?('https://ops.gitlab.net')
182
+ if env_var_value_if_defined('TOP_UPSTREAM_SOURCE_JOB').to_s.start_with?('https://ops.gitlab.net')
174
183
  'staging-orchestrated'
175
184
  else
176
185
  QA::Runtime::Env.default_branch
@@ -184,24 +193,28 @@ module Gitlab
184
193
  @run_id ||= "gitlab-qa-run-#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}-#{SecureRandom.hex(4)}"
185
194
  end
186
195
 
196
+ def colorized_logs?
197
+ enabled?(ENV['COLORIZED_LOGS'], default: false)
198
+ end
199
+
187
200
  def dev_access_token_variable
188
- env_value_if_defined('GITLAB_QA_DEV_ACCESS_TOKEN')
201
+ env_var_name_if_defined('GITLAB_QA_DEV_ACCESS_TOKEN')
189
202
  end
190
203
 
191
204
  def initial_root_password
192
- ENV['GITLAB_INITIAL_ROOT_PASSWORD'] || '5iveL!fe'
205
+ env_var_value_if_defined('GITLAB_INITIAL_ROOT_PASSWORD') || '5iveL!fe'
193
206
  end
194
207
 
195
208
  def deploy_environment
196
- ENV['DEPLOY_ENVIRONMENT'] || pipeline_from_project_name
209
+ env_var_value_if_defined('DEPLOY_ENVIRONMENT') || pipeline_from_project_name
197
210
  end
198
211
 
199
212
  def host_artifacts_dir
200
- @host_artifacts_dir ||= File.join(ENV['QA_ARTIFACTS_DIR'] || '/tmp/gitlab-qa', Runtime::Env.run_id)
213
+ @host_artifacts_dir ||= File.join(env_var_value_if_defined('QA_ARTIFACTS_DIR') || '/tmp/gitlab-qa', Runtime::Env.run_id)
201
214
  end
202
215
 
203
216
  def elastic_version
204
- ENV['ELASTIC_VERSION'] || '6.4.2'.freeze
217
+ env_var_value_if_defined('ELASTIC_VERSION') || '6.4.2'.freeze
205
218
  end
206
219
 
207
220
  def require_license!
@@ -217,25 +230,25 @@ module Gitlab
217
230
  end
218
231
 
219
232
  def require_qa_access_token!
220
- return unless ENV['GITLAB_QA_ACCESS_TOKEN'].to_s.strip.empty?
233
+ return unless env_var_value_if_defined('GITLAB_QA_ACCESS_TOKEN').to_s.strip.empty?
221
234
 
222
235
  raise ArgumentError, "Please provide GITLAB_QA_ACCESS_TOKEN"
223
236
  end
224
237
 
225
238
  def require_qa_dev_access_token!
226
- return unless ENV['GITLAB_QA_DEV_ACCESS_TOKEN'].to_s.strip.empty?
239
+ return unless env_var_value_if_defined('GITLAB_QA_DEV_ACCESS_TOKEN').to_s.strip.empty?
227
240
 
228
241
  raise ArgumentError, "Please provide GITLAB_QA_DEV_ACCESS_TOKEN"
229
242
  end
230
243
 
231
244
  def require_slack_qa_channel!
232
- return unless ENV['SLACK_QA_CHANNEL'].to_s.strip.empty?
245
+ return unless env_var_value_if_defined('SLACK_QA_CHANNEL').to_s.strip.empty?
233
246
 
234
247
  raise ArgumentError, "Please provide SLACK_QA_CHANNEL"
235
248
  end
236
249
 
237
250
  def require_ci_slack_webhook_url!
238
- return unless ENV['CI_SLACK_WEBHOOK_URL'].to_s.strip.empty?
251
+ return unless env_var_value_if_defined('CI_SLACK_WEBHOOK_URL').to_s.strip.empty?
239
252
 
240
253
  raise ArgumentError, "Please provide CI_SLACK_WEBHOOK_URL"
241
254
  end
@@ -265,7 +278,7 @@ module Gitlab
265
278
  end
266
279
 
267
280
  def require_initial_password!
268
- return unless ENV['GITLAB_INITIAL_ROOT_PASSWORD'].to_s.strip.empty?
281
+ return unless env_var_value_if_defined('GITLAB_INITIAL_ROOT_PASSWORD').to_s.strip.empty?
269
282
 
270
283
  raise(
271
284
  ArgumentError,
@@ -289,11 +302,11 @@ module Gitlab
289
302
  end
290
303
 
291
304
  def skip_pull?
292
- enabled?(ENV['QA_SKIP_PULL'], default: false)
305
+ enabled?(env_var_value_if_defined('QA_SKIP_PULL'), default: false)
293
306
  end
294
307
 
295
308
  def geo_failover?
296
- enabled?(ENV['GEO_FAILOVER'], default: false)
309
+ enabled?(env_var_value_if_defined('GEO_FAILOVER'), default: false)
297
310
  end
298
311
 
299
312
  private
@@ -304,9 +317,17 @@ module Gitlab
304
317
  (value =~ /^(false|no|0)$/i) != 0
305
318
  end
306
319
 
307
- def env_value_if_defined(variable)
308
- # Pass through the variables if they are defined in the environment
309
- return "$#{variable}" if ENV[variable]
320
+ def env_var_value_valid?(variable)
321
+ !ENV[variable].blank?
322
+ end
323
+
324
+ def env_var_value_if_defined(variable)
325
+ return ENV[variable] if env_var_value_valid?(variable)
326
+ end
327
+
328
+ def env_var_name_if_defined(variable)
329
+ # Pass through the variables if they are defined and not empty in the environment
330
+ return "$#{variable}" if env_var_value_valid?(variable)
310
331
  end
311
332
  end
312
333
  end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'logger'
4
+ require 'forwardable'
5
+ require'rainbow/refinement'
6
+
7
+ module Gitlab
8
+ module QA
9
+ module Runtime
10
+ module Logger
11
+ extend SingleForwardable
12
+ using Rainbow
13
+
14
+ def_delegators :logger, :debug, :info, :warn, :error, :fatal, :unknown
15
+
16
+ singleton_class.module_eval do
17
+ attr_writer :logger
18
+
19
+ def logger
20
+ Rainbow.enabled = Runtime::Env.colorized_logs?
21
+
22
+ @logger ||= ::Logger.new($stdout).tap do |logger|
23
+ logger.level = Runtime::Env.debug? ? ::Logger::DEBUG : ::Logger::INFO
24
+
25
+ logger.formatter = proc do |severity, datetime, progname, msg|
26
+ date_format = datetime.strftime("%Y-%m-%d %H:%M:%S")
27
+
28
+ "[date=#{date_format} from=GitLab QA] #{severity.ljust(5)}-- ".yellow + "#{msg}\n"
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -12,7 +12,7 @@ module Gitlab
12
12
  gitlab.omnibus_configuration << "actioncable['enable'] = true"
13
13
 
14
14
  gitlab.instance do
15
- puts "Running actioncable specs!"
15
+ Runtime::Logger.info('Running actioncable specs!')
16
16
 
17
17
  rspec_args << "--" unless rspec_args.include?('--')
18
18
  rspec_args << %w[--tag actioncable]
@@ -24,7 +24,7 @@ module Gitlab
24
24
  gitlab.tls = true
25
25
 
26
26
  gitlab.instance do
27
- puts 'Running Client SSL specs!'
27
+ Runtime::Logger.info('Running Client SSL specs!')
28
28
 
29
29
  if @tag
30
30
  rspec_args << "--" unless rspec_args.include?('--')
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module QA
5
+ module Scenario
6
+ module Test
7
+ module Integration
8
+ class CloudActivation < Scenario::Template
9
+ def perform(release, *rspec_args)
10
+ Component::Gitlab.perform do |gitlab|
11
+ gitlab.release = release
12
+ gitlab.network = 'test'
13
+
14
+ gitlab.omnibus_configuration << <<~OMNIBUS
15
+ gitlab_rails['env'] = { 'GITLAB_LICENSE_MODE' => 'test', 'CUSTOMER_PORTAL_URL' => 'https://customers.staging.gitlab.com' }
16
+ OMNIBUS
17
+
18
+ gitlab.instance do
19
+ rspec_args << "--" unless rspec_args.include?('--')
20
+ rspec_args << %w[--tag cloud_activation]
21
+
22
+ Component::Specs.perform do |specs|
23
+ specs.suite = 'Test::Instance::All'
24
+ specs.release = gitlab.release
25
+ specs.network = gitlab.network
26
+ specs.args = [gitlab.address, *rspec_args]
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -27,7 +27,7 @@ module Gitlab
27
27
  elastic.network = 'test'
28
28
  elastic.instance do
29
29
  gitlab.instance do
30
- puts "Running #{spec_suite} specs!"
30
+ Runtime::Logger.info("Running #{spec_suite} specs!")
31
31
 
32
32
  Component::Specs.perform do |specs|
33
33
  specs.suite = spec_suite
@@ -64,7 +64,7 @@ module Gitlab
64
64
  prepare; start; reconfigure; process_exec_commands
65
65
 
66
66
  # shellout to instance specs
67
- puts 'Running Geo primary / secondary specs!'
67
+ Runtime::Logger.info('Running Geo primary / secondary specs!')
68
68
 
69
69
  Component::Specs.perform do |specs|
70
70
  specs.suite = 'QA::EE::Scenario::Test::Geo'
@@ -50,7 +50,7 @@ module Gitlab
50
50
 
51
51
  gitlab.omnibus_configuration << gitlab_omnibus_configuration
52
52
  gitlab.instance do
53
- puts "Running Gitaly Cluster specs!"
53
+ Runtime::Logger.info('Running Gitaly Cluster specs!')
54
54
 
55
55
  if @tag
56
56
  rspec_args << "--" unless rspec_args.include?('--')
@@ -16,7 +16,7 @@ module Gitlab
16
16
 
17
17
  jira.instance do
18
18
  gitlab.instance do
19
- puts 'Running Jira specs!'
19
+ Runtime::Logger.info('Running Jira specs!')
20
20
 
21
21
  rspec_args << "--" unless rspec_args.include?('--')
22
22
  rspec_args << %w[--tag jira]
@@ -52,7 +52,7 @@ module Gitlab
52
52
 
53
53
  def run_specs(gitlab, volumes = {}, *rspec_args)
54
54
  gitlab.instance do
55
- puts "Running #{spec_suite} specs!"
55
+ Runtime::Logger.info("Running #{spec_suite} specs!")
56
56
 
57
57
  Component::Specs.perform do |specs|
58
58
  specs.suite = spec_suite
@@ -33,7 +33,7 @@ module Gitlab
33
33
  gitlab.tls = true
34
34
 
35
35
  gitlab.instance do
36
- puts "Running mTLS specs!"
36
+ Runtime::Logger.info("Running mTLS specs!")
37
37
 
38
38
  if @tag
39
39
  rspec_args << "--" unless rspec_args.include?('--')
@@ -44,7 +44,7 @@ module Gitlab
44
44
 
45
45
  def run_specs(gitlab, release, *rspec_args)
46
46
  gitlab.instance do
47
- puts "Running #{spec_suite} specs!"
47
+ Runtime::Logger.info("Running #{spec_suite} specs!")
48
48
 
49
49
  Component::Specs.perform do |specs|
50
50
  specs.suite = spec_suite
@@ -37,7 +37,7 @@ module Gitlab
37
37
 
38
38
  mail_hog.instance do
39
39
  gitlab.instance do
40
- puts "Running #{spec_suite} specs!"
40
+ Runtime::Logger.info("Running #{spec_suite} specs!")
41
41
 
42
42
  Component::Specs.perform do |specs|
43
43
  specs.suite = spec_suite
@@ -47,7 +47,7 @@ module Gitlab
47
47
 
48
48
  retry_count += 1
49
49
  wait_seconds = response["retry-after"].to_i
50
- puts "Received 429 - Too many requests. Waiting for #{wait_seconds} seconds."
50
+ Runtime::Logger.debug("Received 429 - Too many requests. Waiting for #{wait_seconds} seconds.")
51
51
  sleep wait_seconds
52
52
  end
53
53
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '7.17.1'
5
+ VERSION = '7.18.0'
6
6
  end
7
7
  end
data/lib/gitlab/qa.rb CHANGED
@@ -9,6 +9,7 @@ module Gitlab
9
9
  autoload :Scenario, 'gitlab/qa/runtime/scenario'
10
10
  autoload :TokenFinder, 'gitlab/qa/runtime/token_finder'
11
11
  autoload :OmnibusConfiguration, 'gitlab/qa/runtime/omnibus_configuration'
12
+ autoload :Logger, 'gitlab/qa/runtime/logger'
12
13
 
13
14
  module OmnibusConfigurations
14
15
  autoload :Default, 'gitlab/qa/runtime/omnibus_configurations/default'
@@ -73,6 +74,7 @@ module Gitlab
73
74
  autoload :Registry, 'gitlab/qa/scenario/test/integration/registry'
74
75
  autoload :RegistryTLS, 'gitlab/qa/scenario/test/integration/registry_tls'
75
76
  autoload :ServicePingDisabled, 'gitlab/qa/scenario/test/integration/service_ping_disabled'
77
+ autoload :CloudActivation, 'gitlab/qa/scenario/test/integration/cloud_activation'
76
78
  end
77
79
 
78
80
  module Sanity
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: 7.17.1
4
+ version: 7.18.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: 2021-12-27 00:00:00.000000000 Z
11
+ date: 2022-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '1.10'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rainbow
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 3.0.0
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 3.0.0
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: table_print
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -266,6 +280,7 @@ files:
266
280
  - lib/gitlab/qa/reporter.rb
267
281
  - lib/gitlab/qa/runner.rb
268
282
  - lib/gitlab/qa/runtime/env.rb
283
+ - lib/gitlab/qa/runtime/logger.rb
269
284
  - lib/gitlab/qa/runtime/omnibus_configuration.rb
270
285
  - lib/gitlab/qa/runtime/omnibus_configurations/default.rb
271
286
  - lib/gitlab/qa/runtime/omnibus_configurations/license_mode.rb
@@ -295,6 +310,7 @@ files:
295
310
  - lib/gitlab/qa/scenario/test/instance/staging_ref.rb
296
311
  - lib/gitlab/qa/scenario/test/integration/actioncable.rb
297
312
  - lib/gitlab/qa/scenario/test/integration/client_ssl.rb
313
+ - lib/gitlab/qa/scenario/test/integration/cloud_activation.rb
298
314
  - lib/gitlab/qa/scenario/test/integration/elasticsearch.rb
299
315
  - lib/gitlab/qa/scenario/test/integration/geo.rb
300
316
  - lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb