Created
December 9, 2014 21:12
-
-
Save nicgrayson/df5534c152f6503071ed to your computer and use it in GitHub Desktop.
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
class CMSPromotionStrategy < PromotionStrategy | |
include SkippableYes | |
attr_reader :options | |
def initialize(env, shell, options) | |
@env = env | |
@shell = shell | |
@options = options | |
end | |
def before_alpha | |
@shell.say("Route all traffic to beta to deploy to alpha...", :green) | |
revert_or_continue? | |
end | |
def between_alpha_and_beta | |
@shell.say("Waiting for cms alpha to come up..") | |
revert_or_continue? | |
end | |
def before_beta | |
@shell.say("Routing traffic to alpha to deploy to beta...", :green) | |
revert_or_continue? | |
end | |
def after_beta | |
@shell.say("Route traffic to both.", :green) | |
revert_or_continue? | |
end | |
def revert_or_continue? | |
skippable_yes?("Should we rollback?") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment