Project

General

Profile

Revision 9fb80abe

Added by Ondřej Pražák over 7 years ago

making promoting decisions more robust

View differences:

app/lib/actions/foreman_pipeline/job/promote.rb
9 9
        end
10 10

  
11 11
        def run
12
          unless job.environment.successors.empty?
13
            fail "Content View promotion disabled" if job.to_environments.empty?
12
          unless job.environment.successors.empty? #when we are not at the end of lifecycle path
13
            fail "Content View promotion disabled" unless job.should_be_promoted?
14
            fail "Content view already promoted to the next environment(s), skipping promotion(s)" unless job.promotion_safe?
14 15
            promote_environment
15 16
          end
16 17
        end

Also available in: Unified diff