gitlab-qa 15.3.0 → 15.4.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: 4bc0f25e1bbf4c9d82910a6b8a2da29df78bbe683d620d82cb0d36e28a906dcb
4
- data.tar.gz: '0283a7bc128cc2e86f1e4aa1a7c0c0020be2a6c62c543019c1879e73bf5b9e2f'
3
+ metadata.gz: 8f1e475ea2c0271c08caf2de2d91881fb387148ee9a0686922e5c13905dfbae9
4
+ data.tar.gz: aecf00278bb4ae18d9a4b0b3e1d42d80f3a9b5482a38d755c83a2fa0fc3046ef
5
5
  SHA512:
6
- metadata.gz: 0a14c2e7949b7cbe2b031e13ad5c12488160025c256d831e6bda9158890fc311277f31d10279b1a1b184fbef463b95bac2767b80103fa41a6d011d42ffc2be71
7
- data.tar.gz: e4180225aa649c4796a85c4c016651adc8200cf6b8e2c69e451b8f64e26a32caf7f71bfd28159d026bcd1d6355b541631f6c8ae6f8c28fef38e94929b4216d87
6
+ metadata.gz: 164f25be24c4f6800d9dbb150776876a38e85c5bebcac4a72f449a0ed8e6ac2b65b89502cff82c588f101b6a9b299f3fbc2735f99d4a829990e85cdf5fc5674d
7
+ data.tar.gz: f1bbdd00cb493f5f6cb0a4f48af319503e3526515f12edceb631868194183e0910b08cedbdbf9e92f59177a7632a63b459bef681555b806eecf72bd6def571a7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (15.3.0)
4
+ gitlab-qa (15.4.0)
5
5
  activesupport (>= 6.1, < 7.2)
6
6
  ffi (~> 1.17)
7
7
  gitlab (~> 4.19)
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
- - [Specifics for Mac OS with M1, M2 processors & Docker Desktop](docs/specifics_for_macos_m1_m2.md)
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.html) guide on
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>`
@@ -86,7 +86,7 @@ module Gitlab
86
86
  )
87
87
 
88
88
  <<~CMD.strip
89
- echo "#{runner_config}" > /etc/gitlab-runner/config.toml &&
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
@@ -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
- if dev_gitlab_org? && (match_data = tag.match(DEV_TAG_REGEX))
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')
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '15.3.0'
5
+ VERSION = '15.4.0'
6
6
  end
7
7
  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: 15.3.0
4
+ version: 15.4.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-02-25 00:00:00.000000000 Z
11
+ date: 2025-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -556,7 +556,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
556
556
  - !ruby/object:Gem::Version
557
557
  version: '0'
558
558
  requirements: []
559
- rubygems_version: 3.3.27
559
+ rubygems_version: 3.5.22
560
560
  signing_key:
561
561
  specification_version: 4
562
562
  summary: Integration tests for GitLab