Project

General

Profile

Download (695 Bytes) Statistics
| Branch: | Tag: | Revision:

foreman_pipeline / app / lib / actions / foreman_pipeline / job / run_job_manually.rb @ 4c01c2ee

1
module Actions
2
  module ForemanPipeline
3
    module Job
4
      class RunJobManually < Actions::EntryAction
5

    
6
        def plan(job)
7
          if job.is_valid? && job.target_cv_version_avail? && !job.version_already_promoted?
8
            plan_action(DeployNewHost, job)
9
            plan_self(:info => "Manually triggered job started.", :name => job.name)
10
          else
11
            plan_self(:info => "Manually triggered job execution skipped, check job configuration.", :name => job.name)
12
          end
13
        end
14

    
15
        def run
16
          output = input
17
        end
18

    
19
        def humanized_name
20
          "Run manually ForemanPipeline::Job: #{input[:name]}"
21
        end
22
      end
23
    end
24
  end
25
end