foreman_maintain 1.14.5 → 1.15.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/definitions/features/instance.rb +0 -1
- data/definitions/scenarios/self_upgrade.rb +25 -11
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d0da9c377e1a505e2e26e790b3c93dd94f1f98f0c2e3737c0f1a6871258cac94
|
|
4
|
+
data.tar.gz: 4c7212c07f45f6d03acc727173b8237d5a405326da20a8e5e9a334bceee8b416
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 548f4f675557dcf5d10e803609000531a5b59767a2a694c3458a28a52dc584b190d0bada0711e4e03fbac8ca87fabd2c0f57925c5d008648ce94bd39ffcdb6a4
|
|
7
|
+
data.tar.gz: 3d98ba266c9d46325293385064a4a67567c98a4cb1f533e67f2100b954df643ccb9fcaee25cbf23a2dd1865584bc26ce7896568e19b9b19281e7dd6edd181198
|
|
@@ -179,7 +179,6 @@ class Features::Instance < ForemanMaintain::Feature
|
|
|
179
179
|
def component_features_map
|
|
180
180
|
{
|
|
181
181
|
'candlepin_auth' => %w[candlepin candlepin_database],
|
|
182
|
-
'candlepin_events' => %w[candlepin candlepin_database],
|
|
183
182
|
'candlepin' => %w[candlepin candlepin_database],
|
|
184
183
|
'pulp3' => %w[pulpcore pulpcore_database],
|
|
185
184
|
'pulp3_content' => %w[pulpcore pulpcore_database],
|
|
@@ -4,7 +4,10 @@ module ForemanMaintain::Scenarios
|
|
|
4
4
|
include ForemanMaintain::Concerns::Versions
|
|
5
5
|
|
|
6
6
|
def target_version
|
|
7
|
-
|
|
7
|
+
@target_version ||= begin
|
|
8
|
+
v = Gem::Version.new(feature(:instance).target_version)
|
|
9
|
+
"#{v.segments[0]}.#{v.segments[1] + 1}"
|
|
10
|
+
end
|
|
8
11
|
end
|
|
9
12
|
|
|
10
13
|
def current_version
|
|
@@ -39,19 +42,30 @@ module ForemanMaintain::Scenarios
|
|
|
39
42
|
true
|
|
40
43
|
end
|
|
41
44
|
|
|
45
|
+
def maintain_version
|
|
46
|
+
@maintain_version ||= feature(:instance).target_version
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def current_major
|
|
50
|
+
Gem::Version.new(current_version).segments[0..1].join('.')
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def upgrade_repo_version
|
|
54
|
+
Gem::Version.new(current_version).bump.segments[0..1].join('.')
|
|
55
|
+
end
|
|
56
|
+
|
|
42
57
|
def req_repos_to_update_pkgs
|
|
58
|
+
version = upgrade_repo_version
|
|
43
59
|
if use_rhsm?
|
|
44
|
-
main_rh_repos + [maintenance_repo_id(
|
|
60
|
+
main_rh_repos + [maintenance_repo_id(version)]
|
|
45
61
|
else
|
|
46
|
-
[maintenance_repo_id(
|
|
62
|
+
[maintenance_repo_id(version)]
|
|
47
63
|
end
|
|
48
64
|
end
|
|
49
65
|
|
|
50
66
|
def self_upgrade_allowed?
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
Gem::Version.new(current_version).segments[0..1].join('.') == target ||
|
|
54
|
-
Gem::Version.new(current_version).bump.segments[0..1].join('.') == target
|
|
67
|
+
current_major == maintain_version ||
|
|
68
|
+
Gem::Version.new(current_version).bump.segments[0..1].join('.') == maintain_version
|
|
55
69
|
end
|
|
56
70
|
end
|
|
57
71
|
|
|
@@ -67,10 +81,10 @@ module ForemanMaintain::Scenarios
|
|
|
67
81
|
unless self_upgrade_allowed?
|
|
68
82
|
raise(
|
|
69
83
|
ForemanMaintain::Error::Warn,
|
|
70
|
-
"foreman-maintain
|
|
71
|
-
"version
|
|
72
|
-
"
|
|
73
|
-
"
|
|
84
|
+
"foreman-maintain does not support the installed version of Satellite." \
|
|
85
|
+
"The currently installed version in #{current_version}," \
|
|
86
|
+
"while foreman-maintain only supports #{maintain_version}." \
|
|
87
|
+
"Please install the right version of foreman-maintain."
|
|
74
88
|
)
|
|
75
89
|
end
|
|
76
90
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_maintain
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Nečas
|
|
@@ -500,7 +500,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
500
500
|
- !ruby/object:Gem::Version
|
|
501
501
|
version: '0'
|
|
502
502
|
requirements: []
|
|
503
|
-
rubygems_version: 4.0.
|
|
503
|
+
rubygems_version: 4.0.6
|
|
504
504
|
specification_version: 4
|
|
505
505
|
summary: Foreman maintenance tool belt
|
|
506
506
|
test_files: []
|