Class: Actions::ForemanPipeline::Jenkins::BulkBuild
- Inherits:
-
ActionWithSubPlans
- Object
- ActionWithSubPlans
- Actions::ForemanPipeline::Jenkins::BulkBuild
- Defined in:
- app/lib/actions/foreman_pipeline/jenkins/bulk_build.rb
Instance Method Summary collapse
Instance Method Details
#check_for_errors! ⇒ Object
21 22 23 |
# File 'app/lib/actions/foreman_pipeline/jenkins/bulk_build.rb', line 21 def check_for_errors! # Do nothing. Just wait for all builds to finish and gather results end |
#create_sub_plans ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/lib/actions/foreman_pipeline/jenkins/bulk_build.rb', line 10 def create_sub_plans projects = ::ForemanPipeline::JenkinsProject.where(:id => input[:project_ids]) packs = input[:opts].delete(:packages) input[:opts][:data].merge!({:packages => packs}) projects.map do |project| trigger(BuildProject, input[:opts].merge({:project_id => project.id, :project_name => project.name})) end end |
#plan(projects, opts) ⇒ Object
6 7 8 |
# File 'app/lib/actions/foreman_pipeline/jenkins/bulk_build.rb', line 6 def plan(projects, opts) plan_self(:project_ids => projects.map(&:id), :opts => opts) end |