gitlab-qa 15.10.0 → 15.10.2
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.yml +0 -1
- data/Gemfile.lock +2 -2
- data/docs/configuring_omnibus.md +5 -5
- data/docs/what_tests_can_be_run.md +7 -31
- data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +34 -3
- data/lib/gitlab/qa/version.rb +1 -1
- data/support/setup/gitlab_duo_setup.rb +3 -10
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 84dd5f52a5315b76b1fddcf578afa77b71699744f6c9250edd82c103a74c8e66
|
|
4
|
+
data.tar.gz: a6abb8d04101eac27f5289e705d54f257ca2bad9e451b039c53e9fbc86621509
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a78f8366d7779dc733b81cbde2a6ca07ca3241558424a8b3a3a1944909eeafcebd7c0e942a5d9aadccc461a0f8d7e6ccce6a597b36f2dab39c041d94075d7662
|
|
7
|
+
data.tar.gz: 80b60afd84ec9b1d9aeb470b89cccb97d92d2086ee2c5658446d8db166c52457ad9e438c831a1358a1bc57b8c41d8562b226af01e1a3c0db933ef7365e2e0a06
|
data/.gitlab-ci.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
gitlab-qa (15.10.
|
|
4
|
+
gitlab-qa (15.10.2)
|
|
5
5
|
activesupport (>= 6.1, < 8)
|
|
6
6
|
ffi (~> 1.17)
|
|
7
7
|
gitlab (~> 4.19)
|
|
@@ -42,7 +42,7 @@ GEM
|
|
|
42
42
|
climate_control (1.0.1)
|
|
43
43
|
coderay (1.1.3)
|
|
44
44
|
colored2 (3.1.2)
|
|
45
|
-
concurrent-ruby (1.3.
|
|
45
|
+
concurrent-ruby (1.3.8)
|
|
46
46
|
connection_pool (2.5.4)
|
|
47
47
|
cork (0.3.0)
|
|
48
48
|
colored2 (~> 3.1)
|
data/docs/configuring_omnibus.md
CHANGED
|
@@ -137,9 +137,9 @@ Multiple Configurators may be specified and the order will be preserved in which
|
|
|
137
137
|
E.g., given the arguments:
|
|
138
138
|
|
|
139
139
|
```ruby
|
|
140
|
-
exe/gitlab-qa Test::Instance::Image EE --omnibus-config
|
|
140
|
+
exe/gitlab-qa Test::Instance::Image EE --omnibus-config github_oauth,registry_object_storage
|
|
141
141
|
# or
|
|
142
|
-
exe/gitlab-qa Test::Instance::Image EE --omnibus-config
|
|
142
|
+
exe/gitlab-qa Test::Instance::Image EE --omnibus-config github_oauth --omnibus-config registry_object_storage
|
|
143
143
|
```
|
|
144
144
|
|
|
145
145
|
Omnibus will be configured in the order they appear.
|
|
@@ -147,11 +147,11 @@ Omnibus will be configured in the order they appear.
|
|
|
147
147
|
```ruby
|
|
148
148
|
# /etc/gitlab/gitlab.rb
|
|
149
149
|
#=> Runtime::OmnibusConfiguration::Default#configuration
|
|
150
|
-
#=> Runtime::OmnibusConfiguration::
|
|
151
|
-
#=> Runtime::OmnibusConfiguration::
|
|
150
|
+
#=> Runtime::OmnibusConfiguration::GithubOauth#configuration
|
|
151
|
+
#=> Runtime::OmnibusConfiguration::RegistryObjectStorage#configuration
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
The order is also preserved for Sidecar containers. If the `
|
|
154
|
+
The order is also preserved for Sidecar containers. If the `GithubOauth` and `RegistryObjectStorage` Configurators each prepare a sidecar container, they will be spun up in order from first to last.
|
|
155
155
|
|
|
156
156
|
### Adding one-off configurations
|
|
157
157
|
|
|
@@ -636,41 +636,14 @@ $ export QA_1P_PASSWORD=1password_password
|
|
|
636
636
|
$ export QA_1P_SECRET=1password_secret
|
|
637
637
|
$ export QA_1P_GITHUB_UUID=1password_gitlab-qa-github_item_uuid
|
|
638
638
|
|
|
639
|
-
$ gitlab-qa Test::
|
|
639
|
+
$ gitlab-qa Test::Instance::Image CE --omnibus-config github_oauth
|
|
640
640
|
|
|
641
641
|
# For EE
|
|
642
642
|
$ export EE_LICENSE=$(cat /path/to/gitlab_license)
|
|
643
643
|
|
|
644
|
-
$ gitlab-qa Test::
|
|
644
|
+
$ gitlab-qa Test::Instance::Image EE --omnibus-config github_oauth
|
|
645
645
|
```
|
|
646
646
|
|
|
647
|
-
### `Test::Integration::Packages CE|EE|<full image address>`
|
|
648
|
-
|
|
649
|
-
**Note: This Scenario no longer exists. See https://gitlab.com/gitlab-org/gitlab-qa/-/merge_requests/662**
|
|
650
|
-
|
|
651
|
-
To run Packages tests, you may [configure Omnibus](configuring_omnibus.md) to use the [Packages](https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/lib/gitlab/qa/runtime/omnibus_configurations/packages.rb) configurator.
|
|
652
|
-
|
|
653
|
-
Example:
|
|
654
|
-
|
|
655
|
-
```shell
|
|
656
|
-
$ export EE_LICENSE=$(cat /path/to/Geo.gitlab_license)
|
|
657
|
-
|
|
658
|
-
$ gitlab-qa Test::Instance::Image EE --omnibus-config packages
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
This tests the GitLab Package Registry feature by setting
|
|
662
|
-
`gitlab_rails['packages_enabled'] = true` in the Omnibus configuration
|
|
663
|
-
before starting the GitLab container.
|
|
664
|
-
|
|
665
|
-
To run tests against the GitLab container, a GitLab QA (`gitlab/gitlab-qa`)
|
|
666
|
-
container is spun up and tests are run from it by running the
|
|
667
|
-
`Test::Instance::All` scenario with the `--tag packages` RSpec parameter,
|
|
668
|
-
which runs only the tests with `:packages` metadata.
|
|
669
|
-
|
|
670
|
-
**Required environment variables:**
|
|
671
|
-
|
|
672
|
-
- `EE_LICENSE`: A valid EE license.
|
|
673
|
-
|
|
674
647
|
### `Test::Integration::Praefect CE|EE|<full image address>`
|
|
675
648
|
|
|
676
649
|
This tests [Praefect](https://docs.gitlab.com/ee/administration/gitaly/praefect.html),
|
|
@@ -1035,6 +1008,9 @@ This scenario will run tests from the test suite against an airgapped instance.
|
|
|
1035
1008
|
The airgapped instance is set up by using `iptables` in the GitLab container to block network traffic other than testable ports, and by using runners
|
|
1036
1009
|
in a shared internal network.
|
|
1037
1010
|
|
|
1011
|
+
After the rules are applied, the job fails if the container can connect to gitlab.com on port 443, to example.com on port 80 or 443, or to dns.google on port 53.
|
|
1012
|
+
The job also logs whether gitlab.com port 8080 is reachable, which the rules allow, and how many packets the `OUTPUT` policy dropped. Neither log line fails the job.
|
|
1013
|
+
|
|
1038
1014
|
Example:
|
|
1039
1015
|
|
|
1040
1016
|
```shell
|
|
@@ -1046,7 +1022,7 @@ $ gitlab-qa Test::Instance::Airgapped EE -- --tag smoke
|
|
|
1046
1022
|
|
|
1047
1023
|
### `Test::Instance::Image CE|EE|<full image address> --omnibus-config object_storage`
|
|
1048
1024
|
|
|
1049
|
-
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 [Silo](https://github.com/pgsty/silo) (a MinIO fork) and `object_storage_aws` uses an AWS S3 account with credentials configured in the pipeline as CI Variables. To use Google Cloud Storage pass `--omnibus-config
|
|
1025
|
+
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 [Silo](https://github.com/pgsty/silo) (a MinIO fork) and `object_storage_aws` uses an AWS S3 account with credentials configured in the pipeline as CI Variables. To use Google Cloud Storage pass `--omnibus-config object_storage_gcs`. According to the storage selected it requires:
|
|
1050
1026
|
|
|
1051
1027
|
| Scenario | Variable | Description |
|
|
1052
1028
|
|-----------------------|---------------------|--------------------------------------|
|
|
@@ -1054,7 +1030,7 @@ This orchestrated scenario runs tests from the test suite against a GitLab insta
|
|
|
1054
1030
|
| AWS S3 Object Storage | AWS_S3_KEY_ID | AWS credentials |
|
|
1055
1031
|
| AWS S3 Object Storage | AWS_S3_ACCESS_KEY | AWS credentials |
|
|
1056
1032
|
| AWS S3 Object Storage | AWS_S3_BUCKET_NAME | Name of the bucket set in AWS |
|
|
1057
|
-
| GCP Object Storage | GCS_BUCKET_NAME | Name of the bucket set in
|
|
1033
|
+
| GCP Object Storage | GCS_BUCKET_NAME | Name of the bucket set in GCP |
|
|
1058
1034
|
| GCP Object Storage | GOOGLE_JSON_KEY | JSON key credential |
|
|
1059
1035
|
| GCP Object Storage | GOOGLE_CLIENT_EMAIL | Email address of the service account |
|
|
1060
1036
|
| GCP Object Storage | GOOGLE_PROJECT | GCP project name |
|
|
@@ -39,6 +39,7 @@ module Gitlab
|
|
|
39
39
|
rspec_args << "--" unless rspec_args.include?('--')
|
|
40
40
|
rspec_args << "--tag ~orchestrated"
|
|
41
41
|
gitlab.instance do
|
|
42
|
+
report_gitlab_port_8080(gitlab)
|
|
42
43
|
Component::Specs.perform do |specs|
|
|
43
44
|
specs.suite = 'Test::Instance::Airgapped'
|
|
44
45
|
specs.release = gitlab.release
|
|
@@ -46,14 +47,42 @@ module Gitlab
|
|
|
46
47
|
specs.runner_network = gitlab.runner_network
|
|
47
48
|
specs.args = [gitlab.address, *rspec_args]
|
|
48
49
|
end
|
|
50
|
+
ensure
|
|
51
|
+
report_dropped_packets(gitlab)
|
|
49
52
|
end
|
|
50
53
|
end
|
|
51
54
|
end
|
|
52
55
|
|
|
53
56
|
private
|
|
54
57
|
|
|
58
|
+
def report_dropped_packets(gitlab)
|
|
59
|
+
chain = gitlab.docker.exec(gitlab.name, 'iptables -nvxL OUTPUT')
|
|
60
|
+
Runtime::Logger.info("Airgapped packets dropped by the OUTPUT policy: #{chain[/policy DROP \d+ packets, \d+ bytes/]}")
|
|
61
|
+
rescue Support::ShellCommand::StatusError => e
|
|
62
|
+
Runtime::Logger.warn("Unable to read the airgapped OUTPUT chain counters: #{e.message}")
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def report_gitlab_port_8080(gitlab)
|
|
66
|
+
address = Resolv.getaddress('gitlab.com')
|
|
67
|
+
state = gitlab.docker.exec(gitlab.name, "ncat -zv -w 10 #{address} 8080 > /dev/null 2>&1 && echo open || echo closed")
|
|
68
|
+
if state.include?('open')
|
|
69
|
+
Runtime::Logger.warn("Airgapped finding: gitlab.com port 8080 is reachable")
|
|
70
|
+
else
|
|
71
|
+
Runtime::Logger.info("Airgapped gitlab.com port 8080 is not reachable")
|
|
72
|
+
end
|
|
73
|
+
rescue Resolv::ResolvError, Support::ShellCommand::StatusError => e
|
|
74
|
+
Runtime::Logger.warn("Unable to probe gitlab.com port 8080: #{e.message}")
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def unreachable_check(ip, port)
|
|
78
|
+
reachable = "echo 'Airgapped network faulty. #{ip} port #{port} is reachable.'; exit 1;"
|
|
79
|
+
"if ncat -zv -w 10 #{ip} #{port}; then #{reachable} else echo 'Airgapped connectivity #{ip} port #{port} check passed.'; fi;"
|
|
80
|
+
end
|
|
81
|
+
|
|
55
82
|
def airgap_gitlab_commands
|
|
56
83
|
gitlab_ip = Resolv.getaddress('gitlab.com')
|
|
84
|
+
outside_ip = Resolv.getaddress('example.com')
|
|
85
|
+
resolver_ip = Resolv.getaddress('dns.google')
|
|
57
86
|
gitlab_registry_ip = Resolv.getaddress(QA::Release::COM_REGISTRY)
|
|
58
87
|
dev_gitlab_registry_ip = Resolv.getaddress(QA::Release::DEV_REGISTRY.split(':')[0])
|
|
59
88
|
praefect_ip = config.praefect_ip
|
|
@@ -62,6 +91,7 @@ module Gitlab
|
|
|
62
91
|
# Ping and wget check
|
|
63
92
|
apt-get update && apt-get install -y iptables ncat
|
|
64
93
|
if ncat -zv -w 10 #{gitlab_ip} 80; then echo 'Airgapped connectivity check passed.'; else echo 'Airgapped connectivity check failed - should be able to access gitlab_ip'; exit 1; fi;
|
|
94
|
+
if ncat -zv -w 10 #{outside_ip} 443; then echo 'Airgapped connectivity outside_ip check passed.'; else echo 'Airgapped connectivity check failed - should be able to access outside_ip'; exit 1; fi;
|
|
65
95
|
|
|
66
96
|
echo "Checking regular connectivity..." \
|
|
67
97
|
&& wget --retry-connrefused --waitretry=1 --read-timeout=15 --timeout=10 -t 2 http://registry.gitlab.com > /dev/null 2>&1 \
|
|
@@ -92,9 +122,10 @@ module Gitlab
|
|
|
92
122
|
if ncat -zv -w 10 127.0.0.1 80; then echo 'Airgapped connectivity port 80 check passed.'; else echo 'Airgapped connectivity port 80 check failed.'; exit 1 ; fi;
|
|
93
123
|
if ncat -zv -w 10 #{gitlab_registry_ip} 80; then echo 'Airgapped connectivity port gitlab_registry_ip check passed.'; else echo 'Airgapped connectivity port 80 check failed.'; exit 1; fi;
|
|
94
124
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
125
|
+
#{unreachable_check(gitlab_ip, 443)}
|
|
126
|
+
#{unreachable_check(outside_ip, 80)}
|
|
127
|
+
#{unreachable_check(outside_ip, 443)}
|
|
128
|
+
#{unreachable_check(resolver_ip, 53)}
|
|
98
129
|
AIRGAP_AND_VERIFY_COMMAND
|
|
99
130
|
end
|
|
100
131
|
|
data/lib/gitlab/qa/version.rb
CHANGED
|
@@ -83,20 +83,13 @@ class GitlabDuoSetup
|
|
|
83
83
|
ENV.fetch(key, default) == 'true'
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
GitlabSubscriptions::AddOnPurchase.find_by(add_on: add_on)
|
|
88
|
-
end
|
|
89
|
-
|
|
86
|
+
# AddOnPurchase#add_on is no longer an ActiveRecord association, so query through the model's scopes
|
|
90
87
|
def duo_pro_add_on
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
find_add_on_purchase(add_on: GitlabSubscriptions::AddOn.code_suggestions.last)
|
|
88
|
+
GitlabSubscriptions::AddOnPurchase.for_gitlab_duo_pro.last
|
|
94
89
|
end
|
|
95
90
|
|
|
96
91
|
def duo_enterprise_add_on
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
find_add_on_purchase(add_on: GitlabSubscriptions::AddOn.duo_enterprise.last)
|
|
92
|
+
GitlabSubscriptions::AddOnPurchase.for_duo_enterprise.last
|
|
100
93
|
end
|
|
101
94
|
|
|
102
95
|
def admin
|
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: 15.10.
|
|
4
|
+
version: 15.10.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitLab Quality
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|