gitlab-qa 15.3.0 → 15.5.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/omnibus.gitlab-ci.yml +15 -0
- data/.gitlab/ci/versions.yml +6 -0
- data/.gitlab-ci.yml +15 -15
- data/Gemfile.lock +1 -1
- data/README.md +1 -2
- data/docs/developer/http_mocking.md +1 -1
- data/docs/what_tests_can_be_run.md +3 -0
- data/lib/gitlab/qa/component/gitaly.rb +7 -6
- data/lib/gitlab/qa/component/runner_ops.rb +1 -1
- data/lib/gitlab/qa/release.rb +13 -3
- data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +3 -3
- data/lib/gitlab/qa/scenario/test/instance/repository_storage.rb +12 -13
- data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +3 -3
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +8 -9
- data/lib/gitlab/qa/scenario/test/integration/praefect.rb +5 -5
- data/lib/gitlab/qa/support/gitlab_upgrade_path.rb +65 -0
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 560a6652160efd3d50f067a9025aabe2a50444e2c3a8109793abbb329812bb02
|
4
|
+
data.tar.gz: 1a99c243bd9f380dbcd68138c787dc1603424da7fa9e35ee8183820501926a30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebd9339eab6959505dd2bfd60512b4053a0705952e5285ba13c8d8fe6735731600b3d6bf1614f43202b5a852baf51845405d5adb9f9a10641827c218a602b0f8
|
7
|
+
data.tar.gz: 662a700afcf694d62ab07a7f49454bb0d580a3108b1ff35556bc7f4b84965878b5eae3e4eded2d97cc56c02272d0b527e59725bdc8f401e6070f663b97793361
|
@@ -0,0 +1,15 @@
|
|
1
|
+
include:
|
2
|
+
- project: gitlab-org/gitlab
|
3
|
+
ref: master
|
4
|
+
file: .gitlab/ci/test-on-omnibus/main.gitlab-ci.yml
|
5
|
+
|
6
|
+
# Override git strategy because pipeline template is designed to install 'gitlab-qa' from rubygems and thus does not require
|
7
|
+
# cloning the project, yet here we need to clone repo to run 'gitlab-qa' with all local changes
|
8
|
+
|
9
|
+
cache-gitlab-qa:
|
10
|
+
variables:
|
11
|
+
GIT_STRATEGY: clone
|
12
|
+
|
13
|
+
.omnibus-e2e:
|
14
|
+
variables:
|
15
|
+
GIT_STRATEGY: clone
|
data/.gitlab-ci.yml
CHANGED
@@ -8,9 +8,10 @@
|
|
8
8
|
- vendor/ruby
|
9
9
|
|
10
10
|
include:
|
11
|
+
- local: .gitlab/ci/versions.yml
|
11
12
|
- component: ${CI_SERVER_FQDN}/gitlab-org/components/danger-review/danger-review@1.4.0
|
12
13
|
inputs:
|
13
|
-
job_image: "${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}"
|
14
|
+
job_image: "${CI_REGISTRY}/gitlab-org/gitlab-build-images/ci/debian-${DEBIAN_VERSION}-slim-ruby-${RUBY_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-${GIT_VERSION}"
|
14
15
|
job_stage: "check"
|
15
16
|
- component: gitlab.com/gitlab-org/components/gem-release/gem-release@~latest
|
16
17
|
|
@@ -21,7 +22,7 @@ stages:
|
|
21
22
|
- deploy
|
22
23
|
|
23
24
|
default:
|
24
|
-
image: ${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}
|
25
|
+
image: ${CI_REGISTRY}/gitlab-org/gitlab-build-images/ci/debian-${DEBIAN_VERSION}-slim-ruby-${RUBY_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-${GIT_VERSION}
|
25
26
|
tags:
|
26
27
|
- gitlab-org
|
27
28
|
cache:
|
@@ -42,9 +43,6 @@ workflow:
|
|
42
43
|
- if: '$CI_PIPELINE_SOURCE == "web"'
|
43
44
|
|
44
45
|
variables:
|
45
|
-
DEBIAN_VERSION: bookworm
|
46
|
-
DOCKER_VERSION: "24.0.5"
|
47
|
-
RUBY_VERSION: "3.1.5"
|
48
46
|
BUNDLE_PATH: vendor
|
49
47
|
BUNDLE_SILENCE_ROOT_WARNING: "true"
|
50
48
|
BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true"
|
@@ -55,7 +53,7 @@ variables:
|
|
55
53
|
- if: '$CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable$/)'
|
56
54
|
changes: ["lib/**/version.rb"]
|
57
55
|
|
58
|
-
|
56
|
+
test-on-omnibus-env:
|
59
57
|
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest
|
60
58
|
stage: .pre
|
61
59
|
variables:
|
@@ -71,11 +69,13 @@ package-and-test-env:
|
|
71
69
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
72
70
|
changes:
|
73
71
|
- Gemfile.lock
|
72
|
+
- .gitlab/ci/versions.yml
|
74
73
|
variables:
|
75
74
|
UPDATE_QA_CACHE: "true"
|
76
75
|
- if: '$CI_MERGE_REQUEST_IID'
|
77
76
|
changes:
|
78
77
|
- Gemfile.lock
|
78
|
+
- .gitlab/ci/versions.yml
|
79
79
|
variables:
|
80
80
|
UPDATE_QA_CACHE: "true"
|
81
81
|
- when: always
|
@@ -94,9 +94,11 @@ cache-gems:
|
|
94
94
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
95
95
|
changes:
|
96
96
|
- Gemfile.lock
|
97
|
+
- .gitlab/ci/versions.yml
|
97
98
|
- if: '$CI_MERGE_REQUEST_IID'
|
98
99
|
changes:
|
99
100
|
- Gemfile.lock
|
101
|
+
- .gitlab/ci/versions.yml
|
100
102
|
|
101
103
|
danger-review:
|
102
104
|
needs:
|
@@ -125,10 +127,10 @@ rspec:
|
|
125
127
|
coverage_format: cobertura
|
126
128
|
path: coverage/coverage.xml
|
127
129
|
|
128
|
-
|
130
|
+
test-on-omnibus:
|
129
131
|
stage: qa
|
130
132
|
needs:
|
131
|
-
-
|
133
|
+
- test-on-omnibus-env
|
132
134
|
variables:
|
133
135
|
RELEASE: EE
|
134
136
|
RUN_WITH_BUNDLE: "true"
|
@@ -136,25 +138,23 @@ package-and-test:
|
|
136
138
|
SKIP_REPORT_IN_ISSUES: "true"
|
137
139
|
UPDATE_QA_CACHE: $UPDATE_QA_CACHE
|
138
140
|
GITLAB_QA_CACHE_KEY: $GITLAB_QA_CACHE_KEY
|
139
|
-
|
141
|
+
RUN_ALL_TESTS: "true"
|
142
|
+
QA_PATH: "."
|
143
|
+
QA_RETRY_FAILED_SPECS: "false" # do not retry test failures as gitlab-qa mostly affect deploy part only
|
140
144
|
QA_RUN_TYPE: gitlab-qa
|
141
145
|
QA_EXPORT_TEST_METRICS: "false" # skip metrics export as this pipeline is only used to validate gitlab-qa changes
|
142
146
|
inherit:
|
143
147
|
variables:
|
144
148
|
- RUBY_VERSION
|
145
149
|
- DEBIAN_VERSION
|
146
|
-
- DOCKER_VERSION
|
147
150
|
trigger:
|
151
|
+
include: .gitlab/ci/omnibus.gitlab-ci.yml
|
148
152
|
strategy: depend
|
149
153
|
forward:
|
150
154
|
yaml_variables: true
|
151
155
|
pipeline_variables: true
|
152
|
-
include:
|
153
|
-
- project: gitlab-org/gitlab
|
154
|
-
ref: master
|
155
|
-
file: .gitlab/ci/test-on-omnibus/main.gitlab-ci.yml
|
156
156
|
rules:
|
157
157
|
- if: '$CI_MERGE_REQUEST_IID'
|
158
158
|
when: manual
|
159
159
|
allow_failure: true
|
160
|
-
-
|
160
|
+
- if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable$/'
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -90,9 +90,8 @@ of tests.
|
|
90
90
|
- [Release process](docs/release_process.md)
|
91
91
|
- [Run QA tests against your GDK setup](docs/run_qa_against_gdk.md)
|
92
92
|
- [Trainings](docs/trainings.md)
|
93
|
-
- [Waits](docs/waits.md)
|
94
93
|
- [What tests can be run?](docs/what_tests_can_be_run.md)
|
95
|
-
- [
|
94
|
+
- [Troubleshooting](docs/troubleshooting.md)
|
96
95
|
|
97
96
|
## How do we use it
|
98
97
|
|
@@ -24,5 +24,5 @@ end
|
|
24
24
|
```
|
25
25
|
|
26
26
|
Mock server will be accessible from within gitlab or qa test container via `http://smocker.test` url and admin interface will be
|
27
|
-
accessible via `http://smocker.test:8081`. Refer to [Getting Started](https://smocker.dev/guide/getting-started
|
27
|
+
accessible via `http://smocker.test:8081`. Refer to [Getting Started](https://smocker.dev/docs/guide/getting-started) guide on
|
28
28
|
how to use the server and define mocked requests and responses.
|
@@ -321,6 +321,9 @@ $ gitlab-qa Test::Omnibus::UpdateFromPrevious gitlab-ee:dev-tag 15.6.0-pre major
|
|
321
321
|
|
322
322
|
# Patch upgrade - will perform upgrade from 17.8.1 -> gitlab-ee:dev-tag (17.8.2-pre)
|
323
323
|
$ gitlab-qa Test::Omnibus::UpdateFromPrevious gitlab-ee:dev-tag 17.8.2-pre patch
|
324
|
+
|
325
|
+
# Internal patch upgrade - will perform upgrade from dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ee:17.8.1-internal0-0 -> gitlab-ee:dev-tag (17.8.2-pre)
|
326
|
+
$ gitlab-qa Test::Omnibus::UpdateFromPrevious gitlab-ee:dev-tag 17.8.2-pre internal_patch
|
324
327
|
```
|
325
328
|
|
326
329
|
### `Test::Omnibus::UpdateToNext <full image address> <current_version> <from_edition>`
|
@@ -68,15 +68,16 @@ module Gitlab
|
|
68
68
|
'listen_addr': '0.0.0.0:#{gitaly_port}',
|
69
69
|
'prometheus_listen_addr': '0.0.0.0:9236',
|
70
70
|
'auth_token': 'PRAEFECT_INTERNAL_TOKEN',
|
71
|
-
'transactions': {'enabled': #{Runtime::Env.qa_gitaly_transactions_enabled?}}
|
71
|
+
'transactions': {'enabled': #{Runtime::Env.qa_gitaly_transactions_enabled?}},
|
72
|
+
storage: [
|
73
|
+
{
|
74
|
+
name: '#{name}',
|
75
|
+
path: '/var/opt/gitlab/git-data/repositories',
|
76
|
+
},
|
77
|
+
]
|
72
78
|
}
|
73
79
|
gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
|
74
80
|
gitlab_rails['internal_api_url'] = 'http://#{cluster_config.gitlab_name}.#{cluster_config.network}';
|
75
|
-
git_data_dirs({
|
76
|
-
'#{name}' => {
|
77
|
-
'path' => '/var/opt/gitlab/git-data'
|
78
|
-
}
|
79
|
-
});
|
80
81
|
OMNIBUS
|
81
82
|
end
|
82
83
|
end
|
@@ -86,7 +86,7 @@ module Gitlab
|
|
86
86
|
)
|
87
87
|
|
88
88
|
<<~CMD.strip
|
89
|
-
|
89
|
+
printf '#{runner_config.chomp.gsub(/\n/, '\\n').gsub('"', '\"')}' > /etc/gitlab-runner/config.toml &&
|
90
90
|
gitlab-runner register #{registration_args} &&
|
91
91
|
gitlab-runner run
|
92
92
|
CMD
|
data/lib/gitlab/qa/release.rb
CHANGED
@@ -37,7 +37,7 @@ module Gitlab
|
|
37
37
|
# version
|
38
38
|
DEV_OFFICIAL_TAG_REGEX = /
|
39
39
|
\A
|
40
|
-
(?<version>\d+\.\d+.\d+(?:-rc\d+)?)-(?<edition>ce|ee|jh)
|
40
|
+
(?<version>\d+\.\d+.\d+(?:-rc\d+)?)-(?<edition>ce|ee|jh)(?:\.(?<build>\d+))?
|
41
41
|
\z
|
42
42
|
/xi
|
43
43
|
|
@@ -115,6 +115,11 @@ module Gitlab
|
|
115
115
|
omnibus_project = image.match(CUSTOM_GITLAB_IMAGE_REGEX)[:project]
|
116
116
|
gitlab_project = ci_project_path ? "/#{ci_project_path}/" : "/gitlab-org/gitlab/"
|
117
117
|
|
118
|
+
"#{image.gsub(omnibus_project, gitlab_project)}-qa"
|
119
|
+
elsif dev_gitlab_org?
|
120
|
+
omnibus_project = image.match(CUSTOM_GITLAB_IMAGE_REGEX)[:project]
|
121
|
+
gitlab_project = "/gitlab/gitlab-ee/"
|
122
|
+
|
118
123
|
"#{image.gsub(omnibus_project, gitlab_project)}-qa"
|
119
124
|
else
|
120
125
|
"#{image}-qa"
|
@@ -140,9 +145,14 @@ module Gitlab
|
|
140
145
|
end
|
141
146
|
end
|
142
147
|
|
143
|
-
# Tag scheme for gitlab-{ce,ee}-qa images is like 11.1.0-rc12-ee
|
144
148
|
def qa_tag
|
145
|
-
|
149
|
+
# Case 1: Official packages (e.g., 11.1.0-rc12.ee.0 or 12.5.4-ce.1)
|
150
|
+
if match_data = tag.match(DEV_OFFICIAL_TAG_REGEX)
|
151
|
+
version = match_data[:version]
|
152
|
+
edition = match_data[:edition]
|
153
|
+
"#{version}-#{edition}"
|
154
|
+
# Case 2: Auto-deploy packages from dev.gitlab.org (e.g., 12.1.201906121026-325a6632895.b340d0bd35d)
|
155
|
+
elsif match_data = tag.match(DEV_TAG_REGEX)
|
146
156
|
match_data[:gitlab_ref]
|
147
157
|
else
|
148
158
|
tag.sub(/[-.]([ce]e)(\.(\d+))?\z/, '-\1')
|
@@ -102,12 +102,12 @@ module Gitlab
|
|
102
102
|
<<~OMNIBUS
|
103
103
|
external_url 'http://#{config.gitlab_name}.#{iptables_restricted_network}';
|
104
104
|
|
105
|
-
|
105
|
+
gitlab_rails['repositories_storages'] = {
|
106
106
|
'default' => {
|
107
|
-
'gitaly_address' =>
|
107
|
+
'gitaly_address' => "tcp://#{config.praefect_addr}:#{config.praefect_port}",
|
108
108
|
'gitaly_token' => 'PRAEFECT_EXTERNAL_TOKEN'
|
109
109
|
}
|
110
|
-
}
|
110
|
+
};
|
111
111
|
gitaly['enable'] = false;
|
112
112
|
gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
|
113
113
|
prometheus['scrape_configs'] = [
|
@@ -47,20 +47,19 @@ module Gitlab
|
|
47
47
|
<<~OMNIBUS
|
48
48
|
external_url 'http://gitlab.test';
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
gitlab_rails['repositories_storages'] = {
|
51
|
+
"default" => {
|
52
|
+
"gitaly_address" => "tcp://praefect.test:2305",
|
53
|
+
"gitaly_token" => "PRAEFECT_EXTERNAL_TOKEN"
|
54
54
|
},
|
55
|
-
|
56
|
-
|
57
|
-
'path' => '/var/opt/gitlab/git-data/gitaly'
|
55
|
+
"gitaly" => {
|
56
|
+
"gitaly_address" => "tcp://gitlab.test:8075"
|
58
57
|
},
|
59
|
-
|
60
|
-
|
61
|
-
'path' => '/var/opt/gitlab/git-data/secondary'
|
58
|
+
"secondary" => {
|
59
|
+
"gitaly_address" => "tcp://gitlab.test:8075"
|
62
60
|
}
|
63
|
-
}
|
61
|
+
};
|
62
|
+
|
64
63
|
gitaly['enable'] = true;
|
65
64
|
gitaly['configuration'] = {
|
66
65
|
auth: {
|
@@ -70,11 +69,11 @@ module Gitlab
|
|
70
69
|
storage: [
|
71
70
|
{
|
72
71
|
name: 'gitaly',
|
73
|
-
path: '/var/opt/gitlab/git-data/gitaly',
|
72
|
+
path: '/var/opt/gitlab/git-data/gitaly/repositories',
|
74
73
|
},
|
75
74
|
{
|
76
75
|
name: 'secondary',
|
77
|
-
path: '/var/opt/gitlab/git-data/secondary',
|
76
|
+
path: '/var/opt/gitlab/git-data/secondary/repositories',
|
78
77
|
},
|
79
78
|
],
|
80
79
|
};
|
@@ -51,12 +51,12 @@ module Gitlab
|
|
51
51
|
<<~OMNIBUS
|
52
52
|
external_url 'http://#{config.gitlab_name}.#{config.network}';
|
53
53
|
|
54
|
-
|
54
|
+
gitlab_rails['repositories_storages'] = {
|
55
55
|
'default' => {
|
56
|
-
'gitaly_address' =>
|
56
|
+
'gitaly_address' => "tcp://#{config.praefect_addr}:#{config.praefect_port}",
|
57
57
|
'gitaly_token' => 'PRAEFECT_EXTERNAL_TOKEN'
|
58
58
|
}
|
59
|
-
}
|
59
|
+
};
|
60
60
|
gitaly['enable'] = false;
|
61
61
|
gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
|
62
62
|
prometheus['scrape_configs'] = [
|
@@ -73,10 +73,14 @@ module Gitlab
|
|
73
73
|
gitlab_rails['gitaly_token'] = 'abc123secret';
|
74
74
|
gitlab_shell['secret_token'] = 'shellsecret';
|
75
75
|
|
76
|
-
|
77
|
-
'default' => {
|
78
|
-
|
79
|
-
|
76
|
+
gitlab_rails['repositories_storages'] = {
|
77
|
+
'default' => {
|
78
|
+
'gitaly_address' => "tls://#{@gitaly_name}.#{@network}:9999"
|
79
|
+
},
|
80
|
+
'storage1' => {
|
81
|
+
'gitaly_address' => "tls://#{@gitaly_name}.#{@network}:9999"
|
82
|
+
}
|
83
|
+
}
|
80
84
|
OMNIBUS
|
81
85
|
end
|
82
86
|
|
@@ -118,11 +122,6 @@ module Gitlab
|
|
118
122
|
gitlab_shell['secret_token'] = 'shellsecret';
|
119
123
|
|
120
124
|
gitlab_rails['internal_api_url'] = 'https://#{@gitlab_name}.#{@network}';
|
121
|
-
|
122
|
-
git_data_dirs({
|
123
|
-
'default' => { 'path' => '/var/opt/gitlab/git-data' },
|
124
|
-
'storage1' => { 'path' => '/mnt/gitlab/git-data' },
|
125
|
-
})
|
126
125
|
OMNIBUS
|
127
126
|
end
|
128
127
|
end
|
@@ -19,16 +19,16 @@ module Gitlab
|
|
19
19
|
<<~OMNIBUS
|
20
20
|
external_url 'http://#{config.gitlab_name}.#{config.network}';
|
21
21
|
|
22
|
-
|
22
|
+
gitlab_rails['repositories_storages'] = {
|
23
23
|
'default' => {
|
24
|
-
'gitaly_address' =>
|
24
|
+
'gitaly_address' => "tcp://#{config.praefect_addr}:#{config.praefect_port}",
|
25
25
|
'gitaly_token' => 'PRAEFECT_EXTERNAL_TOKEN'
|
26
26
|
},
|
27
27
|
'gitaly' => {
|
28
|
-
'gitaly_address' =>
|
29
|
-
'path' => '/var/opt/gitlab/git-data'
|
28
|
+
'gitaly_address' => "tcp://#{config.gitlab_name}.#{config.network}:8075"
|
30
29
|
}
|
31
|
-
}
|
30
|
+
}
|
31
|
+
|
32
32
|
gitaly['enable'] = true;
|
33
33
|
gitaly['configuration'] = {
|
34
34
|
auth: {
|
@@ -41,6 +41,8 @@ module Gitlab
|
|
41
41
|
major_upgrade_path
|
42
42
|
when "from_patch"
|
43
43
|
from_patch_upgrade_path
|
44
|
+
when "internal_patch"
|
45
|
+
internal_patch_upgrade_path
|
44
46
|
else
|
45
47
|
raise ArgumentError, "Unknown semver component: #{semver_component}"
|
46
48
|
end
|
@@ -106,6 +108,69 @@ module Gitlab
|
|
106
108
|
[release(latest_patch(next_version))]
|
107
109
|
end
|
108
110
|
|
111
|
+
# Upgrade path for internal patch version
|
112
|
+
# Sets up authentication for internal registry
|
113
|
+
# Finds the latest internal build for the current version
|
114
|
+
#
|
115
|
+
# @return [Array<QA::Release>] Array with the latest internal build for current version or exits with message
|
116
|
+
def internal_patch_upgrade_path
|
117
|
+
unless Runtime::Env.dev_access_token_variable
|
118
|
+
logger.error("Skipping upgrade test as internal patch upgrades are not supported without dev access token")
|
119
|
+
exit 0
|
120
|
+
end
|
121
|
+
|
122
|
+
verify_current_version_exists
|
123
|
+
gitlab_int_reg_repo = "dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ee"
|
124
|
+
|
125
|
+
# Internal releases are stored in private repo and
|
126
|
+
# not available for search with API
|
127
|
+
release = QA::Release.new("#{gitlab_int_reg_repo}:latest")
|
128
|
+
docker = Docker::Engine.new
|
129
|
+
docker.login(**release.login_params) if release.login_params
|
130
|
+
latest_internal_tag = find_latest_internal_tag(gitlab_int_reg_repo, docker)
|
131
|
+
|
132
|
+
if latest_internal_tag
|
133
|
+
[QA::Release.new("#{gitlab_int_reg_repo}:#{latest_internal_tag}")]
|
134
|
+
else
|
135
|
+
logger.warn("No internal image found for GitLab version #{current_version}")
|
136
|
+
exit 0
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
# Find the latest internal tag for the current version
|
141
|
+
# Searches for tags in descending order, from 10 down to 0
|
142
|
+
# Returns the first available tag or nil if none found
|
143
|
+
#
|
144
|
+
# @param [String] gitlab_int_reg_repo Registry repository path
|
145
|
+
# @param [Docker::Engine] docker_engine Docker engine instance
|
146
|
+
# @return [String, nil] Tag name if found, nil otherwise
|
147
|
+
def find_latest_internal_tag(gitlab_int_reg_repo, docker)
|
148
|
+
# Try to find the highest internal release tag, starting from 10
|
149
|
+
latest_internal_tag = nil
|
150
|
+
logger.info("Start searching for the latest released internal image for gitlab version: #{current_version}...")
|
151
|
+
|
152
|
+
# Release team note: no more than 10 internal releases expected for version
|
153
|
+
10.downto(0) do |internal_num|
|
154
|
+
tag = "#{current_version}-internal#{internal_num}-0"
|
155
|
+
image_uri = "#{gitlab_int_reg_repo}:#{tag}"
|
156
|
+
|
157
|
+
logger.info("Checking for image: #{image_uri}")
|
158
|
+
|
159
|
+
begin
|
160
|
+
# Try to pull the image (this will fail if image doesn't exist)
|
161
|
+
docker.pull(image: gitlab_int_reg_repo, tag: tag)
|
162
|
+
|
163
|
+
latest_internal_tag = tag
|
164
|
+
logger.info("Found image: #{image_uri}")
|
165
|
+
break
|
166
|
+
rescue Support::ShellCommand::StatusError => e
|
167
|
+
logger.info("x - Image not found: #{image_uri}, \n #{e}")
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
latest_internal_tag
|
172
|
+
end
|
173
|
+
|
109
174
|
# Docker release image
|
110
175
|
#
|
111
176
|
# @param [String] version
|
data/lib/gitlab/qa/version.rb
CHANGED
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.
|
4
|
+
version: 15.5.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: 2025-
|
11
|
+
date: 2025-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -354,6 +354,8 @@ files:
|
|
354
354
|
- ".gitignore"
|
355
355
|
- ".gitlab-ci.yml"
|
356
356
|
- ".gitlab/changelog_config.yml"
|
357
|
+
- ".gitlab/ci/omnibus.gitlab-ci.yml"
|
358
|
+
- ".gitlab/ci/versions.yml"
|
357
359
|
- ".gitlab/issue_templates/Default.md"
|
358
360
|
- ".gitlab/merge_request_templates/Default.md"
|
359
361
|
- ".gitlab/merge_request_templates/Release.md"
|
@@ -556,7 +558,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
556
558
|
- !ruby/object:Gem::Version
|
557
559
|
version: '0'
|
558
560
|
requirements: []
|
559
|
-
rubygems_version: 3.
|
561
|
+
rubygems_version: 3.5.22
|
560
562
|
signing_key:
|
561
563
|
specification_version: 4
|
562
564
|
summary: Integration tests for GitLab
|