Project

General

Profile

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

foreman_pipeline / app / lib / actions / foreman_pipeline / jenkins / abstract_jenkins_action.rb @ be52ca64

1
module Actions
2
  module ForemanPipeline
3
    module Jenkins
4
      class AbstractJenkinsAction < Actions::EntryAction
5
        
6
        def job
7
          j = ::ForemanPipeline::Job.find input.fetch(:job_id)
8
          fail "no jenkins instance specified for the job with id #{j.id}" if j.jenkins_instance.nil?
9
          j.init_run
10
          j
11
        end
12

    
13
        def jenkins_project
14
          ::ForemanPipeline::JenkinsProject.find input[:project_id]
15
        end
16
        
17
      end
18
    end
19
  end
20
end