-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d89c9a3
commit 30eaa02
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
module Scenarios::Satellite_6_6_z | ||
class Abstract < ForemanMaintain::Scenario | ||
def self.upgrade_metadata(&block) | ||
metadata do | ||
tags :upgrade_to_satellite_6_6_z | ||
confine do | ||
feature(:downstream) && feature(:downstream).current_minor_version == '6.6' | ||
end | ||
instance_eval(&block) | ||
end | ||
end | ||
end | ||
|
||
class PreUpgradeCheck < Abstract | ||
upgrade_metadata do | ||
description 'Checks before upgrading to Satellite 6.6.z' | ||
tags :pre_upgrade_checks | ||
run_strategy :fail_slow | ||
end | ||
|
||
def compose | ||
add_steps(find_checks(:default)) | ||
add_steps(find_checks(:pre_upgrade)) | ||
add_step(Checks::Repositories::Validate.new(:version => '6.6')) | ||
end | ||
end | ||
|
||
class PreMigrations < Abstract | ||
upgrade_metadata do | ||
description 'Procedures before migrating to Satellite 6.6.z' | ||
tags :pre_migrations | ||
end | ||
|
||
def compose | ||
add_steps(find_procedures(:pre_migrations)) | ||
add_step(Procedures::Service::Stop.new) | ||
end | ||
end | ||
|
||
class Migrations < Abstract | ||
upgrade_metadata do | ||
description 'Migration scripts to Satellite 6.6.z' | ||
tags :migrations | ||
end | ||
|
||
def compose | ||
add_step(Procedures::Repositories::Setup.new(:version => '6.6')) | ||
add_step(Procedures::Packages::UnlockVersions.new) | ||
add_step(Procedures::Packages::Update.new(:assumeyes => true)) | ||
add_step(Procedures::Installer::Upgrade.new) | ||
end | ||
end | ||
|
||
class PostMigrations < Abstract | ||
upgrade_metadata do | ||
description 'Procedures after migrating to Satellite 6.6.z' | ||
tags :post_migrations | ||
end | ||
|
||
def compose | ||
add_step(Procedures::Service::Start.new) | ||
add_steps(find_procedures(:post_migrations)) | ||
end | ||
end | ||
|
||
class PostUpgradeChecks < Abstract | ||
upgrade_metadata do | ||
description 'Checks after upgrading to Satellite 6.6.z' | ||
tags :post_upgrade_checks | ||
run_strategy :fail_slow | ||
end | ||
|
||
def compose | ||
add_steps(find_checks(:default)) | ||
add_steps(find_checks(:post_upgrade)) | ||
end | ||
end | ||
end | ||
|
||
ForemanMaintain::UpgradeRunner.register_version('6.6.z', :upgrade_to_satellite_6_6_z) |