Class: Actions::ForemanPipeline::Job::Promote
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::ForemanPipeline::Job::Promote
- Defined in:
- app/lib/actions/foreman_pipeline/job/promote.rb
Instance Method Summary collapse
Instance Method Details
#plan(opts) ⇒ Object
7 8 9 |
# File 'app/lib/actions/foreman_pipeline/job/promote.rb', line 7 def plan(opts) plan_self(opts) end |
#rescue_strategy_for_self ⇒ Object
19 20 21 |
# File 'app/lib/actions/foreman_pipeline/job/promote.rb', line 19 def rescue_strategy_for_self Dynflow::Action::Rescue::Skip end |
#run ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/lib/actions/foreman_pipeline/job/promote.rb', line 11 def run unless job.environment.successors.empty? #when we are not at the end of lifecycle path fail "Content View promotion disabled" unless job.should_be_promoted? fail "Content view already promoted to the next environment(s), skipping promotion(s)" unless job.promotion_safe? promote_environment end end |