gitlab-qa 7.8.4 → 7.8.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8e6f385001950cb2511426d82a6acac3c3615683b8dbd48214df976c6fb07d5
4
- data.tar.gz: 51de85c6c9c5dca24ba24961d45005d9ff2bbe168d7a8819f54ee6412ab0abcd
3
+ metadata.gz: 75ab48c7d1d2eba818e59d14fdf90a781faf6af477c5993f2ebe27296be785bd
4
+ data.tar.gz: bc2614ee2f780463fc21360b2e28885227bfe251e8dd5592657feb6b605fc264
5
5
  SHA512:
6
- metadata.gz: e4ee08298871f1dff0ce9e0c007ac1c7e6d643fd13161f38beac5a59574a43931abf87a904488ba1b9e6037d451b22ad151b10afed9df41ed68bf39b1500e18e
7
- data.tar.gz: 266d10c931d8762dcfb34e9aa07f44a38dd1656cccbdd38a7e559ce04d8fec2144f5156f8b8cc4a372db9420a064940861e17146e78d77c0966cbd497e5a4001
6
+ metadata.gz: 16de17dbf4a4c463fcc185e2432297b597a1d6704f02073010be159dc9994739b20d4733038721011fd1051918589c0cd93d3922d663cc3e3c4dd81545e2e4b0
7
+ data.tar.gz: 3208f2280f9d00c45e051e1bc2894dfbd9df989e7430931d5375054a79499c67c07f95b66dcee6a066ed9019c613cf6d976fa97ef35596c9e2459c43363c7023
data/.gitlab-ci.yml CHANGED
@@ -682,6 +682,27 @@ ee:object_storage_aws-quarantine:
682
682
  GITLAB_QA_OPTS: "--omnibus-config object_storage_aws"
683
683
  QA_RSPEC_TAGS: "--tag quarantine --tag object_storage"
684
684
 
685
+ ee:object_storage_gcs:
686
+ extends:
687
+ - .test
688
+ - .high-capacity
689
+ - .ee-qa
690
+ - .rspec-report-opts
691
+ variables:
692
+ GITLAB_QA_OPTS: "--omnibus-config object_storage_gcs"
693
+ QA_RSPEC_TAGS: "--tag object_storage"
694
+
695
+ ee:object_storage_gcs-quarantine:
696
+ extends:
697
+ - .test
698
+ - .high-capacity
699
+ - .ee-qa
700
+ - .quarantine
701
+ - .rspec-report-opts
702
+ variables:
703
+ GITLAB_QA_OPTS: "--omnibus-config object_storage_gcs"
704
+ QA_RSPEC_TAGS: "--tag quarantine --tag object_storage"
705
+
685
706
  ee:object_storage:
686
707
  extends:
687
708
  - .test
@@ -104,7 +104,11 @@ module Gitlab
104
104
  'AWS_S3_KEY_ID' => :aws_s3_key_id,
105
105
  'AWS_S3_ACCESS_KEY' => :aws_s3_access_key,
106
106
  'AWS_S3_BUCKET_NAME' => :aws_s3_bucket_name,
107
- 'TOP_UPSTREAM_MERGE_REQUEST_IID' => :top_upstream_merge_request_iid
107
+ 'TOP_UPSTREAM_MERGE_REQUEST_IID' => :top_upstream_merge_request_iid,
108
+ 'GOOGLE_PROJECT' => :google_project,
109
+ 'GOOGLE_CLIENT_EMAIL' => :google_client_email,
110
+ 'GOOGLE_JSON_KEY' => :google_json_key,
111
+ 'GCS_BUCKET_NAME' => :gcs_bucket_name
108
112
  }.freeze
109
113
 
110
114
  ENV_VARIABLES.each do |env_name, method_name|
@@ -299,6 +303,12 @@ module Gitlab
299
303
  end
300
304
  end
301
305
 
306
+ def require_gcs_environment!
307
+ %w[GOOGLE_PROJECT GOOGLE_CLIENT_EMAIL GOOGLE_JSON_KEY GCS_BUCKET_NAME].each do |env_key|
308
+ raise ArgumentError, "Environment variable #{env_key} must be set to run GCS object storage specs" unless ENV.key?(env_key)
309
+ end
310
+ end
311
+
302
312
  def require_initial_password!
303
313
  return unless ENV['GITLAB_INITIAL_ROOT_PASSWORD'].to_s.strip.empty?
304
314
 
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+ require 'tempfile'
3
+
4
+ module Gitlab
5
+ module QA
6
+ module Runtime
7
+ module OmnibusConfigurations
8
+ class ObjectStorageGcs < Default
9
+ def configuration
10
+ Runtime::Env.require_gcs_environment!
11
+
12
+ json_key = setup_json_key
13
+
14
+ <<~OMNIBUS
15
+ gitlab_rails['object_store']['connection'] = { 'provider' => 'Google', 'google_project' => '#{Runtime::Env.google_project}', 'google_client_email' => '#{Runtime::Env.google_client_email}', 'google_json_key_location' => '#{json_key.path}' }
16
+
17
+ gitlab_rails['object_store']['objects']['artifacts']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
18
+ gitlab_rails['object_store']['objects']['external_diffs']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
19
+ gitlab_rails['object_store']['objects']['lfs']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
20
+ gitlab_rails['object_store']['objects']['uploads']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
21
+ gitlab_rails['object_store']['objects']['packages']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
22
+ gitlab_rails['object_store']['objects']['dependency_proxy']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
23
+ gitlab_rails['object_store']['objects']['pages']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
24
+ gitlab_rails['object_store']['objects']['terraform_state']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
25
+ OMNIBUS
26
+ end
27
+
28
+ def setup_json_key
29
+ Tempfile.open('gcs-json-key', ENV['CI_PROJECT_DIR']) do |file|
30
+ file.write(ENV.fetch('GOOGLE_JSON_KEY'))
31
+
32
+ file
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '7.8.4'.freeze
3
+ VERSION = '7.8.5'.freeze
4
4
  end
5
5
  end
data/lib/gitlab/qa.rb CHANGED
@@ -15,6 +15,7 @@ module Gitlab
15
15
  autoload :Packages, 'gitlab/qa/runtime/omnibus_configurations/packages'
16
16
  autoload :ObjectStorage, 'gitlab/qa/runtime/omnibus_configurations/object_storage'
17
17
  autoload :ObjectStorageAws, 'gitlab/qa/runtime/omnibus_configurations/object_storage_aws'
18
+ autoload :ObjectStorageGcs, 'gitlab/qa/runtime/omnibus_configurations/object_storage_gcs'
18
19
  autoload :LicenseMode, 'gitlab/qa/runtime/omnibus_configurations/license_mode'
19
20
  end
20
21
  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: 7.8.4
4
+ version: 7.8.5
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-09-13 00:00:00.000000000 Z
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -294,6 +294,7 @@ files:
294
294
  - lib/gitlab/qa/runtime/omnibus_configurations/license_mode.rb
295
295
  - lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
296
296
  - lib/gitlab/qa/runtime/omnibus_configurations/object_storage_aws.rb
297
+ - lib/gitlab/qa/runtime/omnibus_configurations/object_storage_gcs.rb
297
298
  - lib/gitlab/qa/runtime/omnibus_configurations/packages.rb
298
299
  - lib/gitlab/qa/runtime/scenario.rb
299
300
  - lib/gitlab/qa/runtime/token_finder.rb