gitlab-qa 11.1.0 → 11.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8096dd0f8bbb920768cdba226589b8fff443c277c03795ebdb7281b1fa0b243e
4
- data.tar.gz: 376b71befea84be9b722cc53e8f3929382781fd5c47b1a29c7f5540117417fb0
3
+ metadata.gz: 88c544ee8f1f83271ae1d95a95b85d48bdc8d1abda530e8c63925c151972a38d
4
+ data.tar.gz: 8f99edf998bf8bb342f5083f1f9bfbcd69ba64143cacf509553e0380e24acc7b
5
5
  SHA512:
6
- metadata.gz: 8ebb0fc14b72801c83a462b08cbea11f05fffa6366dd8ddbc07838d31d052f65bad914b88acecec1d2528981188603da215712894f4c0c8f2f71b932fe206dfa
7
- data.tar.gz: f707dc6915ac54490314c5ef89805bcde649990cbbfff9151360a3341d30c3820034c65afdaecaf52df58cf986c00005b5974fb526a4dfaebb6f9c6e81bb9b36
6
+ metadata.gz: 2c3ba16fb6771ba6302e074ec9d89b3b884ddaccff171f205453d82fb5aa1fb4a9b7356397f23847f9579e0c8f1e1031fc1dded51a99d86dec13595989b7d802
7
+ data.tar.gz: 998a6798f90d4b9c7ed7836d2ef82409b8fcd622dc92f23a914781e8eb21f428c8ad658b7111d8403a5d1718a176c750e71a69087c0c99cf558f52724b007570
@@ -4,10 +4,16 @@ commit from this merge request, and `<NEW_VERSION>` with the upcoming version nu
4
4
 
5
5
  https://gitlab.com/gitlab-org/gitlab-qa/-/compare/v<PREVIOUS_VERSION>...<COMMIT_UPDATING_VERSION>
6
6
 
7
- ## Checklist
7
+ ## Pre-merge checklist
8
8
 
9
9
  - [ ] Diff link is up-to-date.
10
10
  - [ ] Check the release notes: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-qa/repository/changelog?version=<NEW_VERSION>
11
11
  - [ ] Based on the diff and the release notes, `version.rb` is updated, according to [SemVer](https://semver.org).
12
12
 
13
+ ## Post-merge checklist
14
+
15
+ - [ ] In the `pipeline-common` project, [update the GITLAB_QA_VERSION](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/base.gitlab-ci.yml) and [create a release](https://gitlab.com/gitlab-org/quality/pipeline-common#release-process).
16
+ - [ ] In the GitLab project, update the ref for `pipeline-common` in [`.gitlab/ci/qa-common/main.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/qa-common/main.gitlab-ci.yml).
17
+ - [ ] Unless already done by [`renovate-gitlab-bot`](https://gitlab.com/dashboard/merge_requests?scope=all&state=opened&author_username=gitlab-dependency-update-bot&label_name[]=Quality), or if you need it sooner, in the GitLab project, update the `gitlab-qa` gem version in [`qa/Gemfile`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/Gemfile) and [`qa/Gemfile.lock`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/Gemfile.lock) (for an example, see: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117054).
18
+
13
19
  /label ~Quality ~"type::maintenance" ~"maintenance::dependency" ~Quality
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (11.1.0)
4
+ gitlab-qa (11.3.0)
5
5
  activesupport (~> 6.1)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
@@ -23,7 +23,7 @@ when we make a change - no matter the size of the change.
23
23
  - If there is one, update it if necessary.
24
24
  - If not, update [`lib/gitlab/qa/version.rb`] to an appropriate [semantic version](https://semver.org) in a new merge request using the [release template](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/.gitlab/merge_request_templates/Release.md)
25
25
  and title the MR like `"Bump version to <version>"`.
26
- - Run `bundle update` to update the `Gemfile.lock` with the new version number of `gitlab-qa`.
26
+ - Run `bundle install` to update the `Gemfile.lock` with the new version number of `gitlab-qa`.
27
27
  - Merge the merge request.
28
28
  - The new version should automatically be tagged and pushed to Rubygems by the `gem-release` job in the merge commit pipeline.
29
29
  - Update the release notes for the newly created tag (https://gitlab.com/gitlab-org/gitlab-qa/-/tags):
@@ -9,14 +9,14 @@ I.e, if you have a Selenium server set up at http://localhost:4444 or if you hav
9
9
  | Variable | Description | Default | Example(s) |
10
10
  |---------------------------|----------------------------------------------------------------|----------|--------------------------------|
11
11
  | QA_BROWSER | Browser to run against | "chrome" | "chrome" "edge" |
12
- | QA_BROWSER_VERSION | Version of browser to run against | "111.0" | "latest" "111.0" "mobile-111.0"|
12
+ | QA_SELENOID_BROWSER_VERSION | Version of browser to run against | "111.0" | "latest" "111.0" "mobile-111.0"|
13
13
  | QA_REMOTE_GRID_PROTOCOL | Protocol to use | "http" | "http" "https" |
14
14
  | QA_REMOTE_GRID | Remote grid to run tests against | | "localhost:3000" "provider:80" "selenoid:4444" |
15
15
  | QA_LAYOUT | Used with Selenoid. Tells test nav to expect collapsed menus. "phone" expects collapsed top and left nav bars, "tablet" expects collapsed left nav bar only. | | "phone", "tablet" |
16
16
  | SELENOID_DIRECTORY | Used with Selenoid. Directory to save videos to | "<host_artifacts_dir>/selenoid" | |
17
17
  | USE_SELENOID | Used with Selenoid. Sets up selenoid containers. | false | false, true |
18
18
  | QA_RECORD_VIDEO | Used with Selenoid. Triggers video recording. | false | false, true |
19
- | QA_BROWSER_IMAGE | Used with Selenoid. Sets the browser image to use for video recording. | "selenoid/chrome" | "selenoid/chrome", "registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab" |
19
+ | QA_SELENOID_BROWSER_IMAGE | Used with Selenoid. Sets the browser image to use for video recording. | "selenoid/chrome" | "selenoid/chrome", "registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab" |
20
20
  | QA_VIDEO_RECORDER_IMAGE | Used with Selenoid. Sets the video recorder image to use for video recording. | "presidenten/selenoid-manual-video-recorder" | "presidenten/selenoid-manual-video-recorder" |
21
21
  | QA_VIDEO_RECORDER_VERSION | Used with Selenoid. Sets the video recorder image version to use for video recording. | "latest" | "latest" |
22
22
  | QA_RECORD_VIDEO | Used with Selenoid. Triggers video recording. | false | false, true |
@@ -27,7 +27,7 @@ I.e, if you have a Selenium server set up at http://localhost:4444 or if you hav
27
27
 
28
28
  ## Testing with Selenoid
29
29
 
30
- Running directly against an environment like staging is not recommended because test videos can expose credentials. Therefore, it is best practice to not run against live environments.
30
+ Running directly against an environment like staging is not recommended because test videos can expose credentials. Therefore, it is best practice to not run against live environments. Also note that DOCKER_HOST can't be set to a non-http address.
31
31
 
32
32
  Available browsers are defined in [browsers.json](https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/fixtures/selenoid/browsers.json)
33
33
 
@@ -46,15 +46,15 @@ QA_REMOTE_GRID="selenoid:4444"
46
46
  Include these environment variables:
47
47
 
48
48
  QA_BROWSER="edge"
49
- QA_BROWSER_IMAGE="selenoid/edge"
49
+ QA_SELENOID_BROWSER_IMAGE="browsers/edge"
50
50
 
51
51
  #### To test with a Chrome mobile device browser
52
52
 
53
53
  Include these environment variables:
54
54
 
55
55
  QA_LAYOUT="phone"
56
- QA_BROWSER_IMAGE="registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab"
57
- QA_BROWSER_VERSION=mobile-111.0
56
+ QA_SELENOID_BROWSER_IMAGE="registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab"
57
+ QA_SELENOID_BROWSER_VERSION=mobile-111.0
58
58
 
59
59
  For now we only have version 111.0 available for chrome mobile browser testing.
60
60
 
@@ -236,17 +236,23 @@ module Gitlab
236
236
  end
237
237
 
238
238
  def create_key_file(env_key)
239
- key_file = Tempfile.create(env_key.downcase, ENV['CI_PROJECT_DIR'] || Dir.tmpdir).then do |file|
239
+ directory = ENV['CI_PROJECT_DIR'] || Dir.tmpdir
240
+ unique_filename = "#{env_key.downcase}_#{Time.now.to_i}_#{rand(100)}"
241
+ key_file_path = File.join(directory, unique_filename)
242
+
243
+ File.open(key_file_path, 'w') do |file|
240
244
  file.write(ENV.fetch(env_key))
241
245
  file.fsync
242
- file.close
243
-
244
- file.path
245
246
  end
246
- File.chmod(0o744, key_file)
247
- @volumes[key_file] = key_file
248
247
 
249
- key_file
248
+ File.chmod(0o744, key_file_path)
249
+ @volumes[key_file_path] = key_file_path
250
+
251
+ key_file_path
252
+ end
253
+
254
+ def delete_key_file(path)
255
+ File.delete(path) if File.exist?(path)
250
256
  end
251
257
 
252
258
  private
@@ -53,14 +53,15 @@ module Gitlab
53
53
  private
54
54
 
55
55
  def grid_healthy?
56
- HTTP.get('http://docker:4444/ping').status&.success?
56
+ host = ENV['CI'] || ENV['CI_SERVER'] ? 'docker' : 'localhost'
57
+ HTTP.get("http://#{host}:4444/ping").status&.success?
57
58
  rescue HTTP::ConnectionError => e
58
59
  Runtime::Logger.debug(e)
59
60
  false
60
61
  end
61
62
 
62
63
  def pull_images
63
- docker.pull(image: QA::Runtime::Env.browser_image, tag: Runtime::Env.browser_version)
64
+ docker.pull(image: QA::Runtime::Env.selenoid_browser_image, tag: Runtime::Env.selenoid_browser_version)
64
65
  docker.pull(image: QA::Runtime::Env.video_recorder_image, tag: QA::Runtime::Env.video_recorder_version)
65
66
  end
66
67
 
@@ -20,11 +20,14 @@ module Gitlab
20
20
  @volumes = {}
21
21
  @additional_hosts = []
22
22
  @default_volumes = { '/var/run/docker.sock' => '/var/run/docker.sock' }
23
+
24
+ if Runtime::Env.qa_rspec_report_path.present? # rubocop:disable Style/IfUnlessModifier
25
+ @default_volumes[Runtime::Env.qa_rspec_report_path] = File.join(Docker::Volumes::QA_CONTAINER_WORKDIR, 'rspec')
26
+ end
27
+
23
28
  return if Runtime::Env.qa_knapsack_report_path.blank?
24
29
 
25
- @default_volumes[Runtime::Env.qa_knapsack_report_path] = File.join(
26
- Docker::Volumes::QA_CONTAINER_WORKDIR, 'knapsack'
27
- )
30
+ @default_volumes[Runtime::Env.qa_knapsack_report_path] = File.join(Docker::Volumes::QA_CONTAINER_WORKDIR, 'knapsack')
28
31
  end
29
32
 
30
33
  def perform
@@ -22,12 +22,12 @@ module Gitlab
22
22
  'QA_REMOTE_MOBILE_DEVICE_NAME' => :remote_mobile_device_name,
23
23
  'QA_REMOTE_TUNNEL_ID' => :remote_tunnel_id,
24
24
  'QA_BROWSER' => :browser,
25
- 'QA_BROWSER_VERSION' => :browser_version,
25
+ 'QA_SELENOID_BROWSER_VERSION' => :selenoid_browser_version,
26
26
  'QA_RECORD_VIDEO' => :record_video,
27
27
  'QA_LAYOUT' => :layout,
28
28
  'QA_VIDEO_RECORDER_IMAGE' => :video_recorder_image,
29
29
  'QA_VIDEO_RECORDER_VERSION' => :video_recorder_version,
30
- 'QA_BROWSER_IMAGE' => :browser_image,
30
+ 'QA_SELENOID_BROWSER_IMAGE' => :selenoid_browser_image,
31
31
  'QA_ADDITIONAL_REPOSITORY_STORAGE' => :qa_additional_repository_storage,
32
32
  'QA_PRAEFECT_REPOSITORY_STORAGE' => :qa_praefect_repository_storage,
33
33
  'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
@@ -84,8 +84,12 @@ module Gitlab
84
84
  'KNAPSACK_TEST_DIR' => :knapsack_test_dir,
85
85
  'QA_KNAPSACK_REPORT_GCS_CREDENTIALS' => :qa_knapsack_report_gcs_credentials,
86
86
  'QA_KNAPSACK_REPORT_PATH' => :qa_knapsack_report_path,
87
+ 'QA_RSPEC_REPORT_PATH' => :qa_rspec_report_path,
88
+ 'RSPEC_FAST_QUARANTINE_PATH' => :rspec_fast_quarantine_path,
89
+ 'RSPEC_SKIPPED_TESTS_REPORT_PATH' => :skipped_tests_report_path,
87
90
  'CI' => :ci,
88
91
  'CI_JOB_NAME' => :ci_job_name,
92
+ 'CI_JOB_NAME_SLUG' => :ci_job_name_slug,
89
93
  'CI_JOB_URL' => :ci_job_url,
90
94
  'CI_JOB_TOKEN' => :ci_job_token,
91
95
  'CI_RUNNER_ID' => :ci_runner_id,
@@ -339,12 +343,12 @@ module Gitlab
339
343
  env_var_value_if_defined('QA_VIDEO_RECORDER_VERSION') || 'latest'
340
344
  end
341
345
 
342
- def browser_image
343
- env_var_value_if_defined('QA_BROWSER_IMAGE') || 'selenoid/chrome'
346
+ def selenoid_browser_image
347
+ env_var_value_if_defined('QA_SELENOID_BROWSER_IMAGE') || 'selenoid/chrome'
344
348
  end
345
349
 
346
- def browser_version
347
- env_var_value_if_defined('QA_BROWSER_VERSION') || '111.0'
350
+ def selenoid_browser_version
351
+ env_var_value_if_defined('QA_SELENOID_BROWSER_VERSION') || '111.0'
348
352
  end
349
353
 
350
354
  def qa_run_type
@@ -32,6 +32,9 @@ module Gitlab
32
32
  specs.network = gitlab.network
33
33
  specs.args = [gitlab.address, *rspec_args]
34
34
  end
35
+ ensure
36
+ gitlab.delete_key_file(sign_url_key_path)
37
+ gitlab.delete_key_file(cdn_gcloud_path)
35
38
  end
36
39
  end
37
40
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '11.1.0'
5
+ VERSION = '11.3.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: 11.1.0
4
+ version: 11.3.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: 2023-06-02 00:00:00.000000000 Z
11
+ date: 2023-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control