cpl 2.2.0 → 2.2.1

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: 27661f3a2e2aff2f7018e2cb0e77835ee4de88a8ee0268ec549cafa9d02dfbaa
4
- data.tar.gz: 001a114b051c3501b5449eb6d3e4c9f7dea3fa608c6e4595e2129c3bcad8f855
3
+ metadata.gz: 81caf0d255f4e34e0992abfe2f757f9bf8f248e4fedec251c2f9b42041a6f778
4
+ data.tar.gz: b82433c165d83069894c7bd8b05d24a7b1d06dacd7065577a13c161778ff8833
5
5
  SHA512:
6
- metadata.gz: 38dfd9ca9aa2d28dc7df577677e5732f37740448beb857269ff156da7a8ff2f8627872c958b63e9d1d308ce091df1376e44c09aff96bc82f128edb887e1aba94
7
- data.tar.gz: 14c73bf485166dd5be51ff276b6cef8aa3152bb0482fd92b6752e47575cd43ab0bd620ba1c49de619863cff955b628477eb32188a8f76393423c50b1a81e5b07
6
+ metadata.gz: a9975e154888a11ea748ebd384e6349727510179d8e90b8cec7ee569a4b9bf3ed43c3200405796994a55de97cd63f228ca37c7bfefaf40875d815dd185cdeac4
7
+ data.tar.gz: '04910e7adbf92244805ccb535fbf3f8452df999b95b101a6f373eb8a004b251f3a1c16d63eab460542a03169e15b1f1e597737f194e59c1594c6700f132fb578'
data/CHANGELOG.md CHANGED
@@ -16,6 +16,13 @@ _Please add entries here for your pull requests that have not yet been released.
16
16
 
17
17
  ### Fixed
18
18
 
19
+ - Fixed issue where latest image may be incorrect. [PR 201](https://github.com/shakacode/control-plane-flow/pull/201) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
20
+ - Fixed issue where `build-image` command hangs forever waiting for image to be available. [PR 201](https://github.com/shakacode/control-plane-flow/pull/201) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
21
+
22
+ ## [2.2.0] - 2024-06-07
23
+
24
+ ### Fixed
25
+
19
26
  - Fixed issue where `ps:wait` command hangs forever if workloads are suspended. [PR 198](https://github.com/shakacode/control-plane-flow/pull/198) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
20
27
 
21
28
  ### Added
@@ -230,7 +237,8 @@ _Please add entries here for your pull requests that have not yet been released.
230
237
 
231
238
  - Initial release
232
239
 
233
- [Unreleased]: https://github.com/shakacode/control-plane-flow/compare/v2.1.0...HEAD
240
+ [Unreleased]: https://github.com/shakacode/control-plane-flow/compare/v2.2.0...HEAD
241
+ [2.2.0]: https://github.com/shakacode/control-plane-flow/compare/v2.1.0...v2.2.0
234
242
  [2.1.0]: https://github.com/shakacode/control-plane-flow/compare/v2.0.2...v2.1.0
235
243
  [2.0.2]: https://github.com/shakacode/control-plane-flow/compare/v2.0.1...v2.0.2
236
244
  [2.0.1]: https://github.com/shakacode/control-plane-flow/compare/v2.0.0...v2.0.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cpl (2.2.0)
4
+ cpl (2.2.1)
5
5
  debug (~> 1.7.1)
6
6
  dotenv (~> 2.8.1)
7
7
  jwt (~> 2.8.1)
@@ -52,7 +52,7 @@ GEM
52
52
  rdoc (6.7.0)
53
53
  psych (>= 4.0.0)
54
54
  regexp_parser (2.9.0)
55
- reline (0.5.8)
55
+ reline (0.5.9)
56
56
  io-console (~> 0.5)
57
57
  rexml (3.2.6)
58
58
  rspec (3.12.0)
@@ -96,7 +96,7 @@ GEM
96
96
  simplecov_json_formatter (~> 0.1)
97
97
  simplecov-html (0.12.3)
98
98
  simplecov_json_formatter (0.1.4)
99
- stringio (3.1.0)
99
+ stringio (3.1.1)
100
100
  thor (1.2.2)
101
101
  timecop (0.9.8)
102
102
  unicode-display_width (2.5.0)
@@ -41,7 +41,8 @@ module Command
41
41
  progress.puts("\nPushed image to '/org/#{config.org}/image/#{image_name}'.\n\n")
42
42
 
43
43
  step("Waiting for image to be available", retry_on_failure: true) do
44
- image_name == cp.latest_image(refresh: true)
44
+ images = cp.query_images["items"]
45
+ images.find { |image| image["name"] == image_name }
45
46
  end
46
47
  end
47
48
  end
@@ -39,9 +39,8 @@ class Controlplane # rubocop:disable Metrics/ClassLength
39
39
 
40
40
  # image
41
41
 
42
- def latest_image(a_gvc = gvc, a_org = org, refresh: false)
42
+ def latest_image(a_gvc = gvc, a_org = org)
43
43
  @latest_image ||= {}
44
- @latest_image[a_gvc] = nil if refresh
45
44
  @latest_image[a_gvc] ||=
46
45
  begin
47
46
  items = query_images(a_gvc, a_org)["items"]
@@ -69,7 +68,7 @@ class Controlplane # rubocop:disable Metrics/ClassLength
69
68
  if matching_items.empty?
70
69
  name_only ? "#{app_name}:#{NO_IMAGE_AVAILABLE}" : nil
71
70
  else
72
- latest_item = matching_items.max_by { |item| extract_image_number(item["name"]) }
71
+ latest_item = matching_items.max_by { |item| DateTime.parse(item["created"]) }
73
72
  name_only ? latest_item["name"] : latest_item
74
73
  end
75
74
  end
data/lib/cpl/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cpl
4
- VERSION = "2.2.0"
4
+ VERSION = "2.2.1"
5
5
  MIN_CPLN_VERSION = "2.0.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-06-07 00:00:00.000000000 Z
12
+ date: 2024-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: debug