gitlab-qa 7.6.0 → 7.7.0

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: 1a3edbc7044be8bd41d66f9a132918f13eafb37c31afce7423ec40f494678624
4
- data.tar.gz: 4b4884f9b89b1c2575914d3e6257d7b7754bcf7af566e5f15451e18ebfde024b
3
+ metadata.gz: b1a1313f56de2ef2b59bdaccf1bc7d035d6bffd01c5d5d2ddaca7365293017c9
4
+ data.tar.gz: 3fd92bbd855ab71f59f48e605eb9aa9385fe9173113b85c83a8d592ec28fb0b9
5
5
  SHA512:
6
- metadata.gz: b42783395647923f61c5581e684e2427866ee873577bc9ce7a3ab88b432e8e9719119042e730889e0ac52828a5029731092f422376f45685d99988e335d79c4b
7
- data.tar.gz: b4f70c9b678bc6fc4292951564da6f7bbeced7b611a53b555e538824d11bf9fa5abbf38b5215be753b4b673e6724d3083daed6890b7f861840b91b5246f8e195
6
+ metadata.gz: 577ede9a1cb24fb98710686ede8c7da92fe7a2e357aa6094bd6ddcdb6a6418660a5983f926a470dc367ad41655466bab93522e22721dae757f26fada187ad6ea
7
+ data.tar.gz: db1ac78a81bd21165d5f34c81970dd9c02025c522876d39590b24e807d87833482e0c5cee4ea13a6106bde12f797132aaaf3a4c8179b8fc2741815e82acbbded
data/.gitlab-ci.yml CHANGED
@@ -640,57 +640,16 @@ ee:group_saml-quarantine:
640
640
  variables:
641
641
  QA_SCENARIO: "Test::Integration::GroupSAML"
642
642
 
643
- ce:kubernetes:
644
- extends:
645
- - .test
646
- - .high-capacity
647
- - .ce-qa
648
- - .rspec-report-opts
649
- allow_failure: true
650
- variables:
651
- QA_SCENARIO: "Test::Integration::Kubernetes"
652
-
653
- ce:kubernetes-quarantine:
654
- extends:
655
- - .test
656
- - .high-capacity
657
- - .ce-qa
658
- - .quarantine
659
- - .rspec-report-opts
660
- variables:
661
- QA_SCENARIO: "Test::Integration::Kubernetes"
662
-
663
- ee:kubernetes:
664
- extends:
665
- - .test
666
- - .high-capacity
667
- - .ee-qa
668
- - .rspec-report-opts
669
- allow_failure: true
670
- variables:
671
- QA_SCENARIO: "Test::Integration::Kubernetes"
672
-
673
- ee:kubernetes-quarantine:
674
- extends:
675
- - .test
676
- - .high-capacity
677
- - .ee-qa
678
- - .quarantine
679
- - .rspec-report-opts
680
- variables:
681
- QA_SCENARIO: "Test::Integration::Kubernetes"
682
-
683
- ce:ssh_tunnel:
643
+ ce:object_storage:
684
644
  extends:
685
645
  - .test
686
646
  - .high-capacity
687
647
  - .ce-qa
688
648
  - .rspec-report-opts
689
- allow_failure: true
690
649
  variables:
691
- QA_SCENARIO: "Test::Integration::SSHTunnel"
650
+ GITLAB_QA_OPTS: "--omnibus-config object_storage"
692
651
 
693
- ce:ssh_tunnel-quarantine:
652
+ ce:object_storage-quarantine:
694
653
  extends:
695
654
  - .test
696
655
  - .high-capacity
@@ -698,19 +657,19 @@ ce:ssh_tunnel-quarantine:
698
657
  - .quarantine
699
658
  - .rspec-report-opts
700
659
  variables:
701
- QA_SCENARIO: "Test::Integration::SSHTunnel"
660
+ GITLAB_QA_OPTS: "--omnibus-config object_storage"
702
661
 
703
- ee:ssh_tunnel:
662
+ ee:object_storage_aws:
704
663
  extends:
705
664
  - .test
706
665
  - .high-capacity
707
666
  - .ee-qa
708
667
  - .rspec-report-opts
709
- allow_failure: true
710
668
  variables:
711
- QA_SCENARIO: "Test::Integration::SSHTunnel"
669
+ GITLAB_QA_OPTS: "--omnibus-config object_storage_aws"
670
+ QA_RSPEC_TAGS: "--tag object_storage"
712
671
 
713
- ee:ssh_tunnel-quarantine:
672
+ ee:object_storage_aws-quarantine:
714
673
  extends:
715
674
  - .test
716
675
  - .high-capacity
@@ -718,26 +677,8 @@ ee:ssh_tunnel-quarantine:
718
677
  - .quarantine
719
678
  - .rspec-report-opts
720
679
  variables:
721
- QA_SCENARIO: "Test::Integration::SSHTunnel"
722
-
723
- ce:object_storage:
724
- extends:
725
- - .test
726
- - .high-capacity
727
- - .ce-qa
728
- - .rspec-report-opts
729
- variables:
730
- GITLAB_QA_OPTS: "--omnibus-config object_storage"
731
-
732
- ce:object_storage-quarantine:
733
- extends:
734
- - .test
735
- - .high-capacity
736
- - .ce-qa
737
- - .quarantine
738
- - .rspec-report-opts
739
- variables:
740
- GITLAB_QA_OPTS: "--omnibus-config object_storage"
680
+ GITLAB_QA_OPTS: "--omnibus-config object_storage_aws"
681
+ QA_RSPEC_TAGS: "--tag quarantine --tag object_storage"
741
682
 
742
683
  ee:object_storage:
743
684
  extends:
@@ -1036,50 +977,23 @@ ee:jira-quarantine:
1036
977
  variables:
1037
978
  QA_SCENARIO: "Test::Integration::Jira"
1038
979
 
1039
- generate-allure-report:
1040
- image:
1041
- name: ${GITLAB_DEPENDENCY_PROXY}andrcuns/allure-report-publisher:0.3.3
1042
- entrypoint: [""]
1043
- stage: report
980
+ ce:large-setup:
981
+ extends:
982
+ - .test
983
+ - .high-capacity
984
+ - .ce-qa
985
+ - .rspec-report-opts
1044
986
  variables:
1045
- GIT_STRATEGY: none
1046
- STORAGE_CREDENTIALS: $QA_ALLURE_REPORT_GCS_CREDENTIALS
1047
- GITLAB_AUTH_TOKEN: $GITLAB_QA_MR_ALLURE_REPORT_TOKEN
1048
- # Override allure variables for upstream triggers
1049
- ALLURE_PROJECT_PATH: $TOP_UPSTREAM_SOURCE_PROJECT
1050
- ALLURE_MERGE_REQUEST_IID: $TOP_UPSTREAM_MERGE_REQUEST_IID
1051
- ALLURE_COMMIT_SHA: $TOP_UPSTREAM_SOURCE_SHA
1052
- # Override default before script and don't push cache
1053
- cache:
1054
- policy: pull
1055
- before_script:
1056
- - echo "Generating and publishing allure test report"
1057
- script:
1058
- - |
1059
- allure-report-publisher upload gcs \
1060
- --results-glob="gitlab-qa-run-*/**/allure-results/*" \
1061
- --bucket="gitlab-qa-allure-reports" \
1062
- --prefix="${ALLURE_JOB_NAME}/${TOP_UPSTREAM_SOURCE_REF:=$CI_COMMIT_REF_SLUG}" \
1063
- --update-pr="comment" \
1064
- --copy-latest \
1065
- --ignore-missing-results \
1066
- --color
1067
- allow_failure: true
1068
- rules:
1069
- # Don't run report generation on release pipelines
1070
- - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab-qa" && $RELEASE == null'
1071
- changes: ["lib/**/version.rb"]
1072
- when: never
1073
- - if: '$CI_COMMIT_TAG'
1074
- when: never
1075
- - if: '$CI_PIPELINE_SOURCE == "merge_request_event" || ($CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH)'
1076
- variables:
1077
- ALLURE_JOB_NAME: gitlab-qa
1078
- when: always
1079
- - if: '$TOP_UPSTREAM_SOURCE_PROJECT && $TOP_UPSTREAM_SOURCE_SHA'
1080
- variables:
1081
- ALLURE_JOB_NAME: package-and-qa
1082
- when: always
987
+ QA_RSPEC_TAGS: "--tag can_use_large_setup"
988
+
989
+ ee:large-setup:
990
+ extends:
991
+ - .test
992
+ - .high-capacity
993
+ - .ee-qa
994
+ - .rspec-report-opts
995
+ variables:
996
+ QA_RSPEC_TAGS: "--tag can_use_large_setup"
1083
997
 
1084
998
  # This job requires the `GITLAB_QA_ACCESS_TOKEN` and `GITLAB_QA_DEV_ACCESS_TOKEN`
1085
999
  # variable to be passed when triggered.
@@ -1177,3 +1091,37 @@ notify_slack:
1177
1091
  include:
1178
1092
  - project: 'gitlab-org/quality/pipeline-common'
1179
1093
  file: '/ci/gem-release.yml'
1094
+ - project: 'gitlab-org/quality/pipeline-common'
1095
+ file: '/ci/allure-report.yml'
1096
+
1097
+ generate-allure-report:
1098
+ extends: .generate-allure-report-base
1099
+ stage: report
1100
+ variables:
1101
+ STORAGE_CREDENTIALS: $QA_ALLURE_REPORT_GCS_CREDENTIALS
1102
+ GITLAB_AUTH_TOKEN: $GITLAB_QA_MR_ALLURE_REPORT_TOKEN
1103
+ ALLURE_RESULTS_GLOB: gitlab-qa-run-*/**/allure-results/*
1104
+ # Override allure variables for upstream triggers
1105
+ ALLURE_PROJECT_PATH: $TOP_UPSTREAM_SOURCE_PROJECT
1106
+ ALLURE_MERGE_REQUEST_IID: $TOP_UPSTREAM_MERGE_REQUEST_IID
1107
+ ALLURE_COMMIT_SHA: $TOP_UPSTREAM_SOURCE_SHA
1108
+ # Override default before script and don't push cache
1109
+ cache:
1110
+ policy: pull
1111
+ before_script:
1112
+ - echo "Generating and publishing allure test report"
1113
+ rules:
1114
+ # Don't run report generation on release pipelines
1115
+ - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab-qa" && $RELEASE == null'
1116
+ changes: ["lib/**/version.rb"]
1117
+ when: never
1118
+ - if: '$CI_COMMIT_TAG'
1119
+ when: never
1120
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event" || ($CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH)'
1121
+ variables:
1122
+ ALLURE_JOB_NAME: gitlab-qa
1123
+ when: always
1124
+ - if: '$TOP_UPSTREAM_SOURCE_PROJECT && $TOP_UPSTREAM_SOURCE_SHA'
1125
+ variables:
1126
+ ALLURE_JOB_NAME: package-and-qa
1127
+ when: always
@@ -3,10 +3,17 @@
3
3
 
4
4
  require 'gitlab'
5
5
 
6
+ # Default to "Multi-pipeline (from 'gitlab-org/gitlab-qa' 'notify_upstream_commit:*' jobs)" from current project
7
+ api_token = ENV.fetch('GITLAB_QA_PROJECT_ACCESS_TOKEN') do
8
+ puts "The $GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN variable is deprecated in favor of a dedicated project access token: $GITLAB_QA_PROJECT_ACCESS_TOKEN."
9
+ puts "See https://gitlab.com/groups/gitlab-org/quality/-/epics/17 for more details."
10
+ ENV['GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN']
11
+ end
12
+
6
13
  # Configure credentials to be used with gitlab gem
7
14
  Gitlab.configure do |config|
8
15
  config.endpoint = 'https://gitlab.com/api/v4'
9
- config.private_token = ENV['GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN']
16
+ config.private_token = api_token
10
17
  end
11
18
 
12
19
  class CommitComment
@@ -813,6 +813,15 @@ $ export EE_LICENSE=$(cat /path/to/gitlab_license)
813
813
  $ gitlab-qa Test::Instance::Airgapped EE -- --tag smoke
814
814
  ```
815
815
 
816
+ ### `Test::Instance::Image CE|EE|<full image address> --omnibus-config object_storage`
817
+
818
+ This orchestrated scenario runs tests from the test suite against a GitLab instance which has object storage configured instead of using local storage. The omnibus configuration `object_storage` ([configurator](configuring_omnibus.md)), uses Minio and `object_storage_aws` uses an AWS S3 account with credentials configured in the pipeline as CI Variables (available on 1Password). Requires:
819
+
820
+ * `AWS_S3_REGION` - Region where the bucket is created. To optimize latency, minimize costs, or address regulatory requirements, choose any AWS Region that is geographically close to you.
821
+ * `AWS_S3_KEY_ID` - Key ID for the user accessing the bucket.
822
+ * `AWS_S3_ACCESS_KEY` - Access Key for the user accessing the bucket.
823
+ * `AWS_S3_BUCKET_NAME` - The name of the bucket where objects are stored. After a bucket is created, the name of that bucket cannot be used by another AWS account in any AWS Region until the bucket is deleted.
824
+
816
825
  ### `Test::Instance::Geo EE|<full image address>:nightly|latest|any_tag http://geo-primary.gitlab http://geo-secondary.gitlab`
817
826
 
818
827
  This scenario will run tests tagged `:geo` against a live Geo deployment, by spinning up a GitLab QA (`gitlab/gitlab-qa`)
data/lib/gitlab/qa.rb CHANGED
@@ -14,6 +14,7 @@ module Gitlab
14
14
  autoload :Default, 'gitlab/qa/runtime/omnibus_configurations/default'
15
15
  autoload :Packages, 'gitlab/qa/runtime/omnibus_configurations/packages'
16
16
  autoload :ObjectStorage, 'gitlab/qa/runtime/omnibus_configurations/object_storage'
17
+ autoload :ObjectStorageAws, 'gitlab/qa/runtime/omnibus_configurations/object_storage_aws'
17
18
  autoload :LicenseMode, 'gitlab/qa/runtime/omnibus_configurations/license_mode'
18
19
  end
19
20
  end
@@ -93,7 +93,11 @@ module Gitlab
93
93
  'GITLAB_QA_USER_AGENT' => :gitlab_qa_user_agent,
94
94
  'GEO_FAILOVER' => :geo_failover,
95
95
  'GITLAB_INITIAL_ROOT_PASSWORD' => :initial_root_password,
96
- 'GITLAB_TLS_CERTIFICATE' => :gitlab_tls_certificate
96
+ 'GITLAB_TLS_CERTIFICATE' => :gitlab_tls_certificate,
97
+ 'AWS_S3_REGION' => :aws_s3_region,
98
+ 'AWS_S3_KEY_ID' => :aws_s3_key_id,
99
+ 'AWS_S3_ACCESS_KEY' => :aws_s3_access_key,
100
+ 'AWS_S3_BUCKET_NAME' => :aws_s3_bucket_name
97
101
  }.freeze
98
102
 
99
103
  ENV_VARIABLES.each do |env_name, method_name|
@@ -127,10 +131,6 @@ module Gitlab
127
131
  ENV['GITLAB_API_BASE'] || 'https://gitlab.com/api/v4'
128
132
  end
129
133
 
130
- def gitlab_bot_multi_project_pipeline_polling_token
131
- ENV['GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN']
132
- end
133
-
134
134
  def gitlab_ci_api_token
135
135
  ENV['GITLAB_CI_API_TOKEN']
136
136
  end
@@ -215,6 +215,22 @@ module Gitlab
215
215
  ENV['ELASTIC_VERSION'] || '6.4.2'.freeze
216
216
  end
217
217
 
218
+ def aws_s3_region
219
+ ENV['AWS_S3_REGION']
220
+ end
221
+
222
+ def aws_s3_key_id
223
+ ENV['AWS_S3_KEY_ID']
224
+ end
225
+
226
+ def aws_s3_access_key
227
+ ENV['AWS_S3_ACCESS_KEY']
228
+ end
229
+
230
+ def aws_s3_bucket_name
231
+ ENV['AWS_S3_BUCKET_NAME']
232
+ end
233
+
218
234
  def variables
219
235
  vars = {}
220
236
 
@@ -270,6 +286,12 @@ module Gitlab
270
286
  end
271
287
  end
272
288
 
289
+ def require_aws_s3_environment!
290
+ %w[AWS_S3_REGION AWS_S3_KEY_ID AWS_S3_ACCESS_KEY AWS_S3_BUCKET_NAME].each do |env_key|
291
+ raise ArgumentError, "Environment variable #{env_key} must be set to run AWS S3 object storage specs" unless ENV.key?(env_key)
292
+ end
293
+ end
294
+
273
295
  def require_initial_password!
274
296
  return unless ENV['GITLAB_INITIAL_ROOT_PASSWORD'].to_s.strip.empty?
275
297
 
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module QA
5
+ module Runtime
6
+ module OmnibusConfigurations
7
+ class ObjectStorageAws < Default
8
+ def configuration
9
+ Runtime::Env.require_aws_s3_environment!
10
+
11
+ <<~OMNIBUS
12
+ gitlab_rails['object_store']['enabled'] = true
13
+ gitlab_rails['object_store']['proxy_download'] = true
14
+ gitlab_rails['object_store']['connection'] = { 'provider' => 'AWS', 'region' => '#{Runtime::Env.aws_s3_region}', 'aws_access_key_id' => '#{Runtime::Env.aws_s3_key_id}', 'aws_secret_access_key' => '#{Runtime::Env.aws_s3_access_key}' }
15
+
16
+ gitlab_rails['object_store']['objects']['artifacts']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
17
+ gitlab_rails['object_store']['objects']['external_diffs']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
18
+ gitlab_rails['object_store']['objects']['lfs']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
19
+ gitlab_rails['object_store']['objects']['uploads']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
20
+ gitlab_rails['object_store']['objects']['packages']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
21
+ gitlab_rails['object_store']['objects']['dependency_proxy']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
22
+ gitlab_rails['object_store']['objects']['pages']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
23
+ gitlab_rails['object_store']['objects']['terraform_state']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
24
+ OMNIBUS
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -107,23 +107,24 @@ module Gitlab
107
107
  praefect['database_password'] = 'SQL_PASSWORD';
108
108
  praefect['database_dbname'] = 'praefect_production';
109
109
  praefect['database_sslmode'] = 'disable';
110
- praefect['postgres_queue_enabled'] = true;
111
- praefect['failover_enabled'] = true;
110
+ praefect['database_host_no_proxy'] = '#{@database}.#{@network}';
111
+ praefect['database_port_no_proxy'] = 5432;
112
112
  praefect['failover_election_strategy'] = 'per_repository';
113
113
  praefect['virtual_storages'] = {
114
114
  'default' => {
115
- '#{@primary_node_name}' => {
116
- 'address' => 'tcp://#{@primary_node_name}.#{@network}:8075',
117
- 'token' => 'PRAEFECT_INTERNAL_TOKEN',
118
- 'primary' => true
119
- },
120
- '#{@secondary_node_name}' => {
121
- 'address' => 'tcp://#{@secondary_node_name}.#{@network}:8075',
122
- 'token' => 'PRAEFECT_INTERNAL_TOKEN'
123
- },
124
- '#{@tertiary_node_name}' => {
125
- 'address' => 'tcp://#{@tertiary_node_name}.#{@network}:8075',
126
- 'token' => 'PRAEFECT_INTERNAL_TOKEN'
115
+ 'nodes' => {
116
+ '#{@primary_node_name}' => {
117
+ 'address' => 'tcp://#{@primary_node_name}.#{@network}:8075',
118
+ 'token' => 'PRAEFECT_INTERNAL_TOKEN'
119
+ },
120
+ '#{@secondary_node_name}' => {
121
+ 'address' => 'tcp://#{@secondary_node_name}.#{@network}:8075',
122
+ 'token' => 'PRAEFECT_INTERNAL_TOKEN'
123
+ },
124
+ '#{@tertiary_node_name}' => {
125
+ 'address' => 'tcp://#{@tertiary_node_name}.#{@network}:8075',
126
+ 'token' => 'PRAEFECT_INTERNAL_TOKEN'
127
+ }
127
128
  }
128
129
  }
129
130
  };
@@ -164,7 +165,7 @@ module Gitlab
164
165
  'gitaly_token' => 'PRAEFECT_EXTERNAL_TOKEN'
165
166
  }
166
167
  });
167
- gitaly['listen_addr'] = '0.0.0.0:8075';
168
+ gitaly['enable'] = false;
168
169
  gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
169
170
  prometheus['scrape_configs'] = [
170
171
  {
@@ -27,6 +27,7 @@ module Gitlab
27
27
  'path' => '/var/opt/gitlab/git-data'
28
28
  }
29
29
  });
30
+ gitaly['enable'] = true;
30
31
  gitaly['listen_addr'] = '0.0.0.0:8075';
31
32
  gitaly['auth_token'] = 'secret-token';
32
33
  gitaly['storage'] = [
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '7.6.0'.freeze
3
+ VERSION = '7.7.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: 7.6.0
4
+ version: 7.7.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-07-12 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -293,6 +293,7 @@ files:
293
293
  - lib/gitlab/qa/runtime/omnibus_configurations/default.rb
294
294
  - lib/gitlab/qa/runtime/omnibus_configurations/license_mode.rb
295
295
  - lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
296
+ - lib/gitlab/qa/runtime/omnibus_configurations/object_storage_aws.rb
296
297
  - lib/gitlab/qa/runtime/omnibus_configurations/packages.rb
297
298
  - lib/gitlab/qa/runtime/scenario.rb
298
299
  - lib/gitlab/qa/runtime/token_finder.rb