gitlab-qa 8.8.0 → 8.9.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: e89c4046779c498fad14fac05a4cc8ab68deb9d4ccb62e8eabaaace6af8be17d
4
- data.tar.gz: a0c72ba4f7278b82f59678133578e11f23cb7e39449a82c21ec7beb967a524cc
3
+ metadata.gz: 0ffa49a5a85a5e660bb61689d01b0a7daa3a0004f7e05e5a9100dd83dbeeea55
4
+ data.tar.gz: 8f158219d4c59b3db6181534eafdd55e5ca2abbcae1a0402c4f80d3f8c77fa82
5
5
  SHA512:
6
- metadata.gz: 7847ac077692217f68224ca9fdd31bcdadb833aa4aca0ab16113caf1efe6e1013689bca536d2b4c2b5fb3cd5d6e77a58f36b31e2b7c62d00f49abc66c2d0e683
7
- data.tar.gz: 97e98ce591bb8a7cc2a804b1d1326605df8f68e0561cff27e235ddc48420be385794d8dd02ce635adafabd443b1e3f8ab9f4e4d194949b0fb91aedc06e243f32
6
+ metadata.gz: 7cb6f4b7197625d3db353048368716a80e7bdf17e7060cfaadf90a13d44c96805c76e396b3fa78a6e777dacad191305c12ec78e8c9e8920d3a09100f7d2ebd56
7
+ data.tar.gz: cfec5285a2a0d54986d3984f333497082911febee8d3a368dc2be3f81d04753e2c8a726bd8515d1be62181a591077eb4c47555865e1fc331ace507289adc47a3
@@ -0,0 +1,19 @@
1
+ ce:gitlab_pages:
2
+ extends:
3
+ - .rules:ce-never-when-triggered-by-feature-flag-definition-change
4
+ - .test
5
+ - .high-capacity
6
+ - .ce-variables
7
+ - .rspec-report-opts
8
+ variables:
9
+ QA_SCENARIO: "Test::Integration::GitlabPages"
10
+
11
+ ee:gitlab_pages:
12
+ extends:
13
+ - .rules:ee-never-when-triggered-by-feature-flag-definition-change
14
+ - .test
15
+ - .high-capacity
16
+ - .ee-variables
17
+ - .rspec-report-opts
18
+ variables:
19
+ QA_SCENARIO: "Test::Integration::GitlabPages"
data/.gitlab-ci.yml CHANGED
@@ -100,6 +100,7 @@ generate-jobs:
100
100
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag repository_storage
101
101
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag packages
102
102
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag integrations
103
+ - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag gitlab_pages
103
104
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag mtls
104
105
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag jira
105
106
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag can_use_large_setup
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (8.8.0)
4
+ gitlab-qa (8.9.0)
5
5
  activesupport (~> 6.1)
6
6
  gitlab (~> 4.18.0)
7
7
  http (~> 5.0)
@@ -34,4 +34,8 @@ Note: The `gem-release` job uses:
34
34
  - the `GITLAB_API_TOKEN` environment variable to authenticate against GitLab.com's API in order to create the tag
35
35
  - the `GEM_HOST_API_KEY` environment variable to authenticate against Rubygems.org's API in order to release the gem
36
36
 
37
+ ## Post-release maintenance
38
+
39
+ Please note that `gitlab-qa` version in `gitlab-org/gitlab` project will be updated automatically by [renovate-gitlab-bot](https://gitlab.com/gitlab-org/frontend/renovate-gitlab-bot). However, for live environment pipelines we need to specify the version in `pipeline-common` project manually. Remember to open an MR updating `GITLAB_QA_VERSION` value in [base.gitlab-ci.yml](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/base.gitlab-ci.yml#L4) shortly after the new version is released.
40
+
37
41
  [`lib/gitlab/qa/version.rb`]: https://gitlab.com/gitlab-org/gitlab-qa/blob/master/lib/gitlab/qa/version.rb#L3
@@ -368,6 +368,22 @@ Example:
368
368
  $ gitlab-qa Test::Integration::GitalyCluster EE
369
369
  ```
370
370
 
371
+ ### `Test::Integration::GitlabPages CE|EE|<full image address>`
372
+
373
+ This tests that a GitLab Instance works as expected with [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/) enabled.
374
+
375
+ The scenario configures the instance by setting up these instructions [here](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/main/doc/howto/pages.md) through enabling `gitlab_pages['enable'] = true;`, setting up an external url and the adding of the GitLab Pages hostname and GitLab Instance IP into the `etc/hostfile` on the container that runs the specs so it can access the page on the GitLab container.
376
+
377
+ To run tests against the GitLab container, a GitLab QA (`gitlab/gitlab-qa`)
378
+ container is spun up and tests are run from it by running the
379
+ `Test::Instance::All` scenario with the `:gitlab_pages` tag.
380
+
381
+ Example:
382
+
383
+ ```
384
+ $ gitlab-qa Test::Integration::GitlabPages EE
385
+ ```
386
+
371
387
  ### `Test::Integration::LDAPNoTLS CE|EE|<full image address>`
372
388
 
373
389
  This tests that a GitLab instance works as expected with an external
@@ -51,6 +51,10 @@ module Gitlab
51
51
  teardown unless skip_teardown
52
52
  end
53
53
 
54
+ def ip_address
55
+ docker.inspect(name) { |command| command << "-f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}'" }
56
+ end
57
+
54
58
  alias_method :launch_and_teardown_instance, :instance
55
59
 
56
60
  def prepare
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ # rubocop:disable Metrics/CyclomaticComplexity
2
3
 
3
4
  require 'securerandom'
4
5
 
@@ -10,12 +11,13 @@ module Gitlab
10
11
  # the `qa/` directory located in GitLab CE / EE repositories.
11
12
  #
12
13
  class Specs < Scenario::Template
13
- attr_accessor :suite, :release, :network, :args, :volumes, :env, :runner_network, :hostname
14
+ attr_accessor :suite, :release, :network, :args, :volumes, :env, :runner_network, :hostname, :additional_hosts
14
15
 
15
16
  def initialize
16
17
  @docker = Docker::Engine.new(stream_output: true) # stream test output directly instead of through logger
17
18
  @env = {}
18
19
  @volumes = {}
20
+ @additional_hosts = []
19
21
  @default_volumes = { '/var/run/docker.sock' => '/var/run/docker.sock' }
20
22
  return if Runtime::Env.qa_knapsack_report_path.blank?
21
23
 
@@ -56,8 +58,8 @@ module Gitlab
56
58
  command.env('QA_HOSTNAME', hostname)
57
59
  end
58
60
 
59
- unless Runtime::Env.docker_add_hosts.empty?
60
- hosts = Runtime::Env.docker_add_hosts.map { |host| "--add-host=#{host} " }.join
61
+ if Runtime::Env.docker_add_hosts.present? || additional_hosts.present?
62
+ hosts = Runtime::Env.docker_add_hosts.concat(additional_hosts).map { |host| "--add-host=#{host} " }.join
61
63
  command << hosts # override /etc/hosts in docker container when test runs
62
64
  end
63
65
 
@@ -111,3 +113,4 @@ module Gitlab
111
113
  end
112
114
  end
113
115
  end
116
+ # rubocop:enable Metrics/CyclomaticComplexity
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module QA
5
+ module Scenario
6
+ module Test
7
+ module Integration
8
+ class GitlabPages < Scenario::Template
9
+ def initialize
10
+ @gitlab_name = 'gitlab-pages'
11
+ @network = 'test'
12
+ @pages_host = 'gitlab-pages.test'
13
+ @pages_sandbox_name = 'gitlab-qa-sandbox-group-pages'
14
+ @tag = 'gitlab_pages'
15
+ end
16
+
17
+ def gitlab_omnibus_configuration
18
+ <<~OMNIBUS
19
+ pages_external_url 'http://#{@gitlab_name}.#{@network}';
20
+ gitlab_pages['enable'] = true;
21
+ OMNIBUS
22
+ end
23
+
24
+ def set_sandbox_name(sandbox_name)
25
+ ::Gitlab::QA::Runtime::Env.gitlab_sandbox_name = sandbox_name
26
+ end
27
+
28
+ def perform(release, *rspec_args)
29
+ Component::Gitlab.perform do |gitlab|
30
+ gitlab.release = QA::Release.new(release)
31
+ gitlab.name = @gitlab_name
32
+ gitlab.network = @network
33
+
34
+ set_sandbox_name(@pages_sandbox_name)
35
+
36
+ gitlab.omnibus_configuration << gitlab_omnibus_configuration
37
+ gitlab.instance do
38
+ if @tag
39
+ rspec_args << "--" unless rspec_args.include?('--')
40
+ rspec_args << "--tag" << @tag
41
+ end
42
+
43
+ Component::Specs.perform do |specs|
44
+ specs.additional_hosts << "#{@pages_sandbox_name}.#{@pages_host}:#{gitlab.ip_address}"
45
+ specs.suite = 'Test::Instance::All'
46
+ specs.release = gitlab.release
47
+ specs.network = gitlab.network
48
+ specs.args = [gitlab.address, *rspec_args]
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '8.8.0'
5
+ VERSION = '8.9.0'
6
6
  end
7
7
  end
@@ -40,6 +40,7 @@ class GenerateQAJobs
40
40
  jobs.merge!(load_yml_contents('opensearch', should_automatically_run?('test_integration_opensearch')))
41
41
  jobs.merge!(load_yml_contents('praefect', should_automatically_run?('test_instance_all')))
42
42
  jobs.merge!(load_yml_contents('gitaly_cluster', should_automatically_run?('test_instance_all')))
43
+ jobs.merge!(load_yml_contents('gitlab_pages', should_automatically_run?('test_instance_all_gitlab_pages')))
43
44
  jobs.merge!(load_yml_contents('mtls', should_automatically_run?('test_instance_all_mtls')))
44
45
  jobs.merge!(load_yml_contents('smtp', should_automatically_run?('test_integration_smtp')))
45
46
  jobs.merge!(load_yml_contents('jira', should_automatically_run?('test_instance_all_jira')))
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: 8.8.0
4
+ version: 8.9.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: 2022-10-19 00:00:00.000000000 Z
11
+ date: 2022-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -268,6 +268,7 @@ files:
268
268
  - ".gitlab/ci/jobs/elasticsearch.gitlab-ci.yml"
269
269
  - ".gitlab/ci/jobs/geo.gitlab-ci.yml"
270
270
  - ".gitlab/ci/jobs/gitaly_cluster.gitlab-ci.yml"
271
+ - ".gitlab/ci/jobs/gitlab_pages.gitlab-ci.yml"
271
272
  - ".gitlab/ci/jobs/group_saml.gitlab-ci.yml"
272
273
  - ".gitlab/ci/jobs/instance.gitlab-ci.yml"
273
274
  - ".gitlab/ci/jobs/instance_saml.gitlab-ci.yml"
@@ -416,6 +417,7 @@ files:
416
417
  - lib/gitlab/qa/scenario/test/integration/elasticsearch.rb
417
418
  - lib/gitlab/qa/scenario/test/integration/geo.rb
418
419
  - lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb
420
+ - lib/gitlab/qa/scenario/test/integration/gitlab_pages.rb
419
421
  - lib/gitlab/qa/scenario/test/integration/group_saml.rb
420
422
  - lib/gitlab/qa/scenario/test/integration/instance_saml.rb
421
423
  - lib/gitlab/qa/scenario/test/integration/integrations.rb