gitlab-qa 8.8.0 → 8.10.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 +4 -4
- data/.gitlab/ci/jobs/gitlab_pages.gitlab-ci.yml +19 -0
- data/.gitlab-ci.yml +1 -0
- data/Gemfile.lock +32 -33
- data/docs/release_process.md +4 -0
- data/docs/what_tests_can_be_run.md +16 -0
- data/gitlab-qa.gemspec +0 -1
- data/lib/gitlab/qa/component/base.rb +4 -0
- data/lib/gitlab/qa/component/chaos.rb +43 -46
- data/lib/gitlab/qa/component/specs.rb +6 -3
- data/lib/gitlab/qa/release.rb +23 -15
- data/lib/gitlab/qa/scenario/test/integration/gitlab_pages.rb +58 -0
- data/lib/gitlab/qa/version.rb +1 -1
- data/scripts/generate-qa-jobs.rb +1 -0
- metadata +4 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f953400de439363c7574e32bc75e4dfe90a51223708bb57c38c268e591b57bc8
|
|
4
|
+
data.tar.gz: fa43874f0bfd3e8524ab496bf44ea21b67dd42a8cecc532a6d020050603c3a2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc7a630d56deab744601fe176c17c52fdec1073701b990118eb7a11068e44faa65f068de470b1c340b8bca9fd4fc2d61fa82f980be84f8fd4c6c405799bfefe7
|
|
7
|
+
data.tar.gz: c5638a094566d7b27cf24a0d6ec4a7eebfcee7c8e26df7c5ea32d86a3944b3d6b59ec9f4ce768c20206bb743b8a6bd477521e6d4832f97fa005cd193fb23b43b
|
|
@@ -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,27 +1,26 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
gitlab-qa (8.
|
|
4
|
+
gitlab-qa (8.10.0)
|
|
5
5
|
activesupport (~> 6.1)
|
|
6
6
|
gitlab (~> 4.18.0)
|
|
7
7
|
http (~> 5.0)
|
|
8
8
|
nokogiri (~> 1.10)
|
|
9
9
|
rainbow (>= 3, < 4)
|
|
10
10
|
table_print (= 1.5.7)
|
|
11
|
-
toxiproxy (~> 2.0.2)
|
|
12
11
|
zeitwerk (>= 2, < 3)
|
|
13
12
|
|
|
14
13
|
GEM
|
|
15
14
|
remote: https://rubygems.org/
|
|
16
15
|
specs:
|
|
17
|
-
activesupport (6.1.
|
|
16
|
+
activesupport (6.1.7)
|
|
18
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
19
18
|
i18n (>= 1.6, < 2)
|
|
20
19
|
minitest (>= 5.1)
|
|
21
20
|
tzinfo (~> 2.0)
|
|
22
21
|
zeitwerk (~> 2.3)
|
|
23
|
-
addressable (2.8.
|
|
24
|
-
public_suffix (>= 2.0.2, <
|
|
22
|
+
addressable (2.8.1)
|
|
23
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
25
24
|
ast (2.4.2)
|
|
26
25
|
backport (1.2.0)
|
|
27
26
|
benchmark (0.2.0)
|
|
@@ -38,7 +37,7 @@ GEM
|
|
|
38
37
|
colored2 (~> 3.1)
|
|
39
38
|
crack (0.4.5)
|
|
40
39
|
rexml
|
|
41
|
-
danger (
|
|
40
|
+
danger (9.0.0)
|
|
42
41
|
claide (~> 1.0)
|
|
43
42
|
claide-plugins (>= 0.9.2)
|
|
44
43
|
colored2 (~> 3.1)
|
|
@@ -49,7 +48,7 @@ GEM
|
|
|
49
48
|
kramdown (~> 2.3)
|
|
50
49
|
kramdown-parser-gfm (~> 1.0)
|
|
51
50
|
no_proxy_fix
|
|
52
|
-
octokit (~>
|
|
51
|
+
octokit (~> 5.0)
|
|
53
52
|
terminal-table (>= 1, < 4)
|
|
54
53
|
danger-gitlab (8.0.0)
|
|
55
54
|
danger
|
|
@@ -58,7 +57,7 @@ GEM
|
|
|
58
57
|
domain_name (0.5.20190701)
|
|
59
58
|
unf (>= 0.0.5, < 1.0.0)
|
|
60
59
|
e2mmap (0.1.0)
|
|
61
|
-
faraday (1.10.
|
|
60
|
+
faraday (1.10.2)
|
|
62
61
|
faraday-em_http (~> 1.0)
|
|
63
62
|
faraday-em_synchrony (~> 1.0)
|
|
64
63
|
faraday-excon (~> 1.1)
|
|
@@ -73,7 +72,7 @@ GEM
|
|
|
73
72
|
faraday-em_http (1.0.0)
|
|
74
73
|
faraday-em_synchrony (1.0.0)
|
|
75
74
|
faraday-excon (1.1.0)
|
|
76
|
-
faraday-http-cache (2.4.
|
|
75
|
+
faraday-http-cache (2.4.1)
|
|
77
76
|
faraday (>= 0.8)
|
|
78
77
|
faraday-httpclient (1.0.1)
|
|
79
78
|
faraday-multipart (1.0.4)
|
|
@@ -87,7 +86,8 @@ GEM
|
|
|
87
86
|
ffi-compiler (1.0.1)
|
|
88
87
|
ffi (>= 1.0.0)
|
|
89
88
|
rake
|
|
90
|
-
git (1.
|
|
89
|
+
git (1.12.0)
|
|
90
|
+
addressable (~> 2.8)
|
|
91
91
|
rchardet (~> 1.8)
|
|
92
92
|
gitlab (4.18.0)
|
|
93
93
|
httparty (~> 0.18)
|
|
@@ -128,47 +128,47 @@ GEM
|
|
|
128
128
|
mime-types-data (~> 3.2015)
|
|
129
129
|
mime-types-data (3.2022.0105)
|
|
130
130
|
mini_portile2 (2.8.0)
|
|
131
|
-
minitest (5.16.
|
|
131
|
+
minitest (5.16.3)
|
|
132
132
|
multi_xml (0.6.0)
|
|
133
133
|
multipart-post (2.2.3)
|
|
134
134
|
nap (1.1.0)
|
|
135
135
|
no_proxy_fix (0.1.2)
|
|
136
|
-
nokogiri (1.13.
|
|
136
|
+
nokogiri (1.13.9)
|
|
137
137
|
mini_portile2 (~> 2.8.0)
|
|
138
138
|
racc (~> 1.4)
|
|
139
|
-
octokit (
|
|
139
|
+
octokit (5.6.1)
|
|
140
140
|
faraday (>= 1, < 3)
|
|
141
141
|
sawyer (~> 0.9)
|
|
142
142
|
open4 (1.3.4)
|
|
143
143
|
parallel (1.22.1)
|
|
144
|
-
parser (3.1.2.
|
|
144
|
+
parser (3.1.2.1)
|
|
145
145
|
ast (~> 2.4.1)
|
|
146
146
|
pry (0.14.1)
|
|
147
147
|
coderay (~> 1.1)
|
|
148
148
|
method_source (~> 1.0)
|
|
149
|
-
public_suffix (
|
|
149
|
+
public_suffix (5.0.0)
|
|
150
150
|
racc (1.6.0)
|
|
151
|
-
rack (
|
|
152
|
-
rainbow (3.
|
|
151
|
+
rack (3.0.0)
|
|
152
|
+
rainbow (3.1.1)
|
|
153
153
|
rake (13.0.6)
|
|
154
154
|
rchardet (1.8.0)
|
|
155
|
-
regexp_parser (2.
|
|
155
|
+
regexp_parser (2.6.0)
|
|
156
156
|
reverse_markdown (2.1.1)
|
|
157
157
|
nokogiri
|
|
158
158
|
rexml (3.2.5)
|
|
159
|
-
rspec (3.
|
|
160
|
-
rspec-core (~> 3.
|
|
161
|
-
rspec-expectations (~> 3.
|
|
162
|
-
rspec-mocks (~> 3.
|
|
163
|
-
rspec-core (3.
|
|
164
|
-
rspec-support (~> 3.
|
|
165
|
-
rspec-expectations (3.
|
|
159
|
+
rspec (3.12.0)
|
|
160
|
+
rspec-core (~> 3.12.0)
|
|
161
|
+
rspec-expectations (~> 3.12.0)
|
|
162
|
+
rspec-mocks (~> 3.12.0)
|
|
163
|
+
rspec-core (3.12.0)
|
|
164
|
+
rspec-support (~> 3.12.0)
|
|
165
|
+
rspec-expectations (3.12.0)
|
|
166
166
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
167
|
-
rspec-support (~> 3.
|
|
168
|
-
rspec-mocks (3.
|
|
167
|
+
rspec-support (~> 3.12.0)
|
|
168
|
+
rspec-mocks (3.12.0)
|
|
169
169
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
170
|
-
rspec-support (~> 3.
|
|
171
|
-
rspec-support (3.
|
|
170
|
+
rspec-support (~> 3.12.0)
|
|
171
|
+
rspec-support (3.12.0)
|
|
172
172
|
rubocop (0.93.1)
|
|
173
173
|
parallel (~> 1.10)
|
|
174
174
|
parser (>= 2.7.1.5)
|
|
@@ -178,7 +178,7 @@ GEM
|
|
|
178
178
|
rubocop-ast (>= 0.6.0)
|
|
179
179
|
ruby-progressbar (~> 1.7)
|
|
180
180
|
unicode-display_width (>= 1.4.0, < 2.0)
|
|
181
|
-
rubocop-ast (1.
|
|
181
|
+
rubocop-ast (1.23.0)
|
|
182
182
|
parser (>= 3.1.1.0)
|
|
183
183
|
rubocop-gitlab-security (0.1.1)
|
|
184
184
|
rubocop (>= 0.51)
|
|
@@ -197,7 +197,7 @@ GEM
|
|
|
197
197
|
sawyer (0.9.2)
|
|
198
198
|
addressable (>= 2.3.5)
|
|
199
199
|
faraday (>= 0.17.3, < 3)
|
|
200
|
-
solargraph (0.
|
|
200
|
+
solargraph (0.47.2)
|
|
201
201
|
backport (~> 1.2)
|
|
202
202
|
benchmark
|
|
203
203
|
bundler (>= 1.17.2)
|
|
@@ -217,7 +217,6 @@ GEM
|
|
|
217
217
|
unicode-display_width (>= 1.1.1, < 3)
|
|
218
218
|
thor (1.2.1)
|
|
219
219
|
tilt (2.0.11)
|
|
220
|
-
toxiproxy (2.0.2)
|
|
221
220
|
tzinfo (2.0.5)
|
|
222
221
|
concurrent-ruby (~> 1.0)
|
|
223
222
|
unf (0.1.4)
|
|
@@ -231,7 +230,7 @@ GEM
|
|
|
231
230
|
webrick (1.7.0)
|
|
232
231
|
yard (0.9.28)
|
|
233
232
|
webrick (~> 1.7.0)
|
|
234
|
-
zeitwerk (2.6.
|
|
233
|
+
zeitwerk (2.6.1)
|
|
235
234
|
|
|
236
235
|
PLATFORMS
|
|
237
236
|
ruby
|
data/docs/release_process.md
CHANGED
|
@@ -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
|
data/gitlab-qa.gemspec
CHANGED
|
@@ -34,6 +34,5 @@ Gem::Specification.new do |spec|
|
|
|
34
34
|
spec.add_runtime_dependency 'nokogiri', '~> 1.10'
|
|
35
35
|
spec.add_runtime_dependency 'rainbow', '>= 3', '< 4'
|
|
36
36
|
spec.add_runtime_dependency 'table_print', '1.5.7'
|
|
37
|
-
spec.add_runtime_dependency 'toxiproxy', '~> 2.0.2'
|
|
38
37
|
spec.add_runtime_dependency 'zeitwerk', '>= 2', '< 3'
|
|
39
38
|
end
|
|
@@ -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,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
require 'json'
|
|
3
4
|
|
|
4
5
|
module Gitlab
|
|
5
6
|
module QA
|
|
@@ -26,52 +27,48 @@ module Gitlab
|
|
|
26
27
|
command << "--publish 8474:8474"
|
|
27
28
|
end
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
upstream: "postgres.test:5432",
|
|
38
|
-
"enabled": true
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: "praefect",
|
|
42
|
-
listen: "[::]:2305",
|
|
43
|
-
upstream: "praefect.test:2305",
|
|
44
|
-
"enabled": true
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: "gitaly1",
|
|
48
|
-
listen: "[::]:8076",
|
|
49
|
-
upstream: "gitaly1.test:8076",
|
|
50
|
-
"enabled": true
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: "gitaly2",
|
|
54
|
-
listen: "[::]:8077",
|
|
55
|
-
upstream: "gitaly2.test:8077",
|
|
56
|
-
"enabled": true
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: "gitaly3",
|
|
60
|
-
listen: "[::]:8078",
|
|
61
|
-
upstream: "gitaly3.test:8078",
|
|
62
|
-
"enabled": true
|
|
63
|
-
}
|
|
64
|
-
])
|
|
65
|
-
rescue StandardError => e
|
|
66
|
-
Runtime::Logger.warn e.message
|
|
30
|
+
QA::Support::Shellout.shell <<~CMD
|
|
31
|
+
docker run --network #{@network} --rm curlimages/curl:7.85.0 \
|
|
32
|
+
-i -s \
|
|
33
|
+
-X POST http://#{name}:8474/populate \
|
|
34
|
+
-H 'Content-Type: application/json' \
|
|
35
|
+
-d '#{proxies.to_json}'
|
|
36
|
+
CMD
|
|
37
|
+
end
|
|
67
38
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
39
|
+
def proxies
|
|
40
|
+
[
|
|
41
|
+
{
|
|
42
|
+
name: "postgres",
|
|
43
|
+
listen: "[::]:5432",
|
|
44
|
+
upstream: "postgres.test:5432",
|
|
45
|
+
enabled: true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "praefect",
|
|
49
|
+
listen: "[::]:2305",
|
|
50
|
+
upstream: "praefect.test:2305",
|
|
51
|
+
enabled: true
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "gitaly1",
|
|
55
|
+
listen: "[::]:8076",
|
|
56
|
+
upstream: "gitaly1.test:8076",
|
|
57
|
+
enabled: true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "gitaly2",
|
|
61
|
+
listen: "[::]:8077",
|
|
62
|
+
upstream: "gitaly2.test:8077",
|
|
63
|
+
enabled: true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "gitaly3",
|
|
67
|
+
listen: "[::]:8078",
|
|
68
|
+
upstream: "gitaly3.test:8078",
|
|
69
|
+
enabled: true
|
|
70
|
+
}
|
|
71
|
+
]
|
|
75
72
|
end
|
|
76
73
|
end
|
|
77
74
|
end
|
|
@@ -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
|
-
|
|
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
|
data/lib/gitlab/qa/release.rb
CHANGED
|
@@ -160,23 +160,27 @@ module Gitlab
|
|
|
160
160
|
password: Runtime::Env.dev_access_token_variable,
|
|
161
161
|
registry: DEV_REGISTRY
|
|
162
162
|
}
|
|
163
|
-
elsif omnibus_mirror?
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
[Runtime::Env.gitlab_username, Runtime::Env.qa_container_registry_access_token]
|
|
168
|
-
else
|
|
169
|
-
Runtime::Env.require_qa_access_token!
|
|
163
|
+
elsif omnibus_mirror? || omnibus_security?
|
|
164
|
+
omnibus_login_params
|
|
165
|
+
end
|
|
166
|
+
end
|
|
170
167
|
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
def omnibus_login_params
|
|
169
|
+
username, password = if Runtime::Env.ci_job_token && Runtime::Env.ci_pipeline_source.include?('pipeline')
|
|
170
|
+
['gitlab-ci-token', Runtime::Env.ci_job_token]
|
|
171
|
+
elsif Runtime::Env.qa_container_registry_access_token
|
|
172
|
+
[Runtime::Env.gitlab_username, Runtime::Env.qa_container_registry_access_token]
|
|
173
|
+
else
|
|
174
|
+
Runtime::Env.require_qa_access_token!
|
|
173
175
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
[Runtime::Env.gitlab_username, Runtime::Env.qa_access_token]
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
{
|
|
180
|
+
username: username,
|
|
181
|
+
password: password,
|
|
182
|
+
registry: COM_REGISTRY
|
|
183
|
+
}
|
|
180
184
|
end
|
|
181
185
|
|
|
182
186
|
def dev_gitlab_org?
|
|
@@ -187,6 +191,10 @@ module Gitlab
|
|
|
187
191
|
image.start_with?("#{COM_REGISTRY}/gitlab-org/build/omnibus-gitlab-mirror/")
|
|
188
192
|
end
|
|
189
193
|
|
|
194
|
+
def omnibus_security?
|
|
195
|
+
image.start_with?("#{COM_REGISTRY}/gitlab-org/security/omnibus-gitlab/")
|
|
196
|
+
end
|
|
197
|
+
|
|
190
198
|
def valid?
|
|
191
199
|
canonical? || release.match?(CUSTOM_GITLAB_IMAGE_REGEX)
|
|
192
200
|
end
|
|
@@ -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
|
data/lib/gitlab/qa/version.rb
CHANGED
data/scripts/generate-qa-jobs.rb
CHANGED
|
@@ -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.
|
|
4
|
+
version: 8.10.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-
|
|
11
|
+
date: 2022-10-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|
|
@@ -212,20 +212,6 @@ dependencies:
|
|
|
212
212
|
- - '='
|
|
213
213
|
- !ruby/object:Gem::Version
|
|
214
214
|
version: 1.5.7
|
|
215
|
-
- !ruby/object:Gem::Dependency
|
|
216
|
-
name: toxiproxy
|
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
|
218
|
-
requirements:
|
|
219
|
-
- - "~>"
|
|
220
|
-
- !ruby/object:Gem::Version
|
|
221
|
-
version: 2.0.2
|
|
222
|
-
type: :runtime
|
|
223
|
-
prerelease: false
|
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
225
|
-
requirements:
|
|
226
|
-
- - "~>"
|
|
227
|
-
- !ruby/object:Gem::Version
|
|
228
|
-
version: 2.0.2
|
|
229
215
|
- !ruby/object:Gem::Dependency
|
|
230
216
|
name: zeitwerk
|
|
231
217
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -268,6 +254,7 @@ files:
|
|
|
268
254
|
- ".gitlab/ci/jobs/elasticsearch.gitlab-ci.yml"
|
|
269
255
|
- ".gitlab/ci/jobs/geo.gitlab-ci.yml"
|
|
270
256
|
- ".gitlab/ci/jobs/gitaly_cluster.gitlab-ci.yml"
|
|
257
|
+
- ".gitlab/ci/jobs/gitlab_pages.gitlab-ci.yml"
|
|
271
258
|
- ".gitlab/ci/jobs/group_saml.gitlab-ci.yml"
|
|
272
259
|
- ".gitlab/ci/jobs/instance.gitlab-ci.yml"
|
|
273
260
|
- ".gitlab/ci/jobs/instance_saml.gitlab-ci.yml"
|
|
@@ -416,6 +403,7 @@ files:
|
|
|
416
403
|
- lib/gitlab/qa/scenario/test/integration/elasticsearch.rb
|
|
417
404
|
- lib/gitlab/qa/scenario/test/integration/geo.rb
|
|
418
405
|
- lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb
|
|
406
|
+
- lib/gitlab/qa/scenario/test/integration/gitlab_pages.rb
|
|
419
407
|
- lib/gitlab/qa/scenario/test/integration/group_saml.rb
|
|
420
408
|
- lib/gitlab/qa/scenario/test/integration/instance_saml.rb
|
|
421
409
|
- lib/gitlab/qa/scenario/test/integration/integrations.rb
|