gitlab-qa 2.0.0 → 2.1.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: c17e7bee760ef32484d6f507fd02608e47770000ec56f04b8ea24974e97c6c7d
4
- data.tar.gz: cbacf02dfcda7387f1d0e9fcaad84d13ce95f123e25b36b8beb3ddcda6ac68ce
3
+ metadata.gz: 0a1792891cdd9b76cbc19fd4d505bdbee99bf11c06579d443d2280b24d91d062
4
+ data.tar.gz: 06d7f8564698ec57242200c7742821f2f157f347bb4c70c74b8ff340f5922e80
5
5
  SHA512:
6
- metadata.gz: c6dabae50aa76d1495294821144ba623244daaf523d17fe3ff9d4503df5734880e8c4b54017d303d898d192bc638636b0352254d24cf7f62e52bac6973a3e4a1
7
- data.tar.gz: 83f9fa4f377e1503551acb8a3eba379e301553f95e4de95c811c86a5d63dd96e54dfed864a16800629d9c0fa3434851b14ee034f939f98904dba1c975dcfb105
6
+ metadata.gz: be317b77cf388846911a1ca380f1d92716ac93f88095b18b21f6eef0aa5c0b9e8b31dddc8c0712b5424dcd31061b53b19219210f48d64bd5c74bbb68d05fcd90
7
+ data.tar.gz: 5af3675ee8ab80bc9f1c7e557bf6d7d66c0fcb48f2153d7f5add50f5e61456efe751a8e78caaba4cb665c9d4c3ab5e0fdf34c5563063c64c3a26b86e9448bf40
@@ -225,10 +225,13 @@ $ export GITLAB_USERNAME=your_username
225
225
  $ export GITLAB_PASSWORD=your_password
226
226
 
227
227
  # Runs the QA suite for an instance running GitLab CE 10.8.1
228
- $ gitlab-qa Test::Instance::Any EE:10.8.1-ce https://your.instance.gitlab
228
+ $ gitlab-qa Test::Instance::Any CE:10.8.1-ce https://your.instance.gitlab
229
229
 
230
230
  # Runs the QA suite for an instance running GitLab EE 10.7.3
231
231
  $ gitlab-qa Test::Instance::Any EE:10.7.3-ee https://your.instance.gitlab
232
+
233
+ # You can even pass a gitlab-{ce,ee}-qa image directly
234
+ $ gitlab-qa Test::Instance::Any registry.gitlab.com:5000/gitlab/gitlab-ce-qa:v11.1.0-rc12 https://your.instance.gitlab
232
235
  ```
233
236
 
234
237
  ### `Test::Instance::Staging`
@@ -19,7 +19,7 @@ module Gitlab
19
19
 
20
20
  puts "Running test suite `#{suite}` for #{release.project_name}"
21
21
 
22
- name = "gitlab-#{release.edition}-qa-#{SecureRandom.hex(4)}"
22
+ name = "#{release.project_name}-qa-#{SecureRandom.hex(4)}"
23
23
 
24
24
  @docker.run(release.qa_image, release.qa_tag, suite, *args) do |command|
25
25
  command << "-t --rm --net=#{network || 'bridge'}"
@@ -1,8 +1,25 @@
1
1
  module Gitlab
2
2
  module QA
3
3
  class Release
4
- CANONICAL_REGEX = /\A(?<edition>ce|ee):?(?<tag>.+)?/i
5
- CUSTOM_GITLAB_IMAGE_REGEX = %r{/gitlab-(?<edition>[ce]e):(?<tag>.+)\z}
4
+ CANONICAL_REGEX = /
5
+ \A
6
+ (?<edition>ce|ee)
7
+ (-qa)?
8
+ (:(?<tag>.+))?
9
+ \z
10
+ /xi
11
+ CUSTOM_GITLAB_IMAGE_REGEX = %r{
12
+ \A
13
+ (?<image_without_tag>
14
+ (?<registry>[^\/:]+(:(?<port>\d+))?)
15
+ .+
16
+ gitlab-
17
+ (?<edition>ce|ee)
18
+ )
19
+ (-qa)?
20
+ (:(?<tag>.+))?
21
+ \z
22
+ }xi
6
23
  DEFAULT_TAG = 'latest'.freeze
7
24
  DEFAULT_CANONICAL_TAG = 'nightly'.freeze
8
25
  DEV_REGISTRY = 'dev.gitlab.org:5005'.freeze
@@ -48,7 +65,7 @@ module Gitlab
48
65
  if canonical?
49
66
  "gitlab/gitlab-#{edition}"
50
67
  else
51
- release.sub(%r{(?<image_without_tag>.+(?<port>:\d+)?/.+)(?<tag>:.+)\z}, '\k<image_without_tag>')
68
+ release.match(CUSTOM_GITLAB_IMAGE_REGEX)[:image_without_tag]
52
69
  end
53
70
  end
54
71
 
@@ -57,9 +74,15 @@ module Gitlab
57
74
  end
58
75
 
59
76
  def project_name
60
- @project_name ||= image.sub(%r{^gitlab\/}, '')
77
+ @project_name ||=
78
+ if canonical?
79
+ "gitlab-#{edition}"
80
+ else
81
+ "gitlab-#{release.match(CUSTOM_GITLAB_IMAGE_REGEX)[:edition]}"
82
+ end
61
83
  end
62
84
 
85
+ # Tag scheme for gitlab-{ce,ee} images is like 11.1.0-rc12.ee.0
63
86
  def tag
64
87
  @tag ||=
65
88
  if canonical?
@@ -69,6 +92,7 @@ module Gitlab
69
92
  end
70
93
  end
71
94
 
95
+ # Tag scheme for gitlab-{ce,ee}-qa images is like 11.1.0-rc12-ee
72
96
  def qa_tag
73
97
  tag.sub(/\.([ce]e)/, '-\1').sub(/\.(\d+)\z/, '')
74
98
  end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '2.0.0'.freeze
3
+ VERSION = '2.1.0'.freeze
4
4
  end
5
5
  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: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grzegorz Bizon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-17 00:00:00.000000000 Z
11
+ date: 2018-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control