Revision cc9f53b0
Added by Ondřej Pražák almost 6 years ago
app/lib/actions/foreman_pipeline/jenkins/build.rb | ||
---|---|---|
5 | 5 |
class Build < AbstractJenkinsAction |
6 | 6 |
|
7 | 7 |
def run |
8 |
#are we willing to wait longer than 5 mins until build starts?
|
|
9 |
output[:build_num] = job.jenkins_instance.client.job.build(jenkins_project.name, params, 'build_start_timeout' => 300)
|
|
8 |
# are we willing to wait longer than 30 mins until build starts?
|
|
9 |
output[:build_num] = job.jenkins_instance.client.job.build(jenkins_project.name, params, 'build_start_timeout' => (30 * 60))
|
|
10 | 10 |
output[:project_name] = jenkins_project.name |
11 | 11 |
output[:build_params] = params |
12 | 12 |
end |
app/lib/actions/foreman_pipeline/job/create_host.rb | ||
---|---|---|
36 | 36 |
|
37 | 37 |
organization_param |
38 | 38 |
keys_param |
39 |
|
|
39 |
host.apply_compute_profile(InterfaceMerge.new) |
|
40 | 40 |
host.save! |
41 | 41 |
jenkins_pubkey_param_for host |
42 | 42 |
host.power.start |
app/lib/actions/foreman_pipeline/job/wait_until_provisioned.rb | ||
---|---|---|
34 | 34 |
end |
35 | 35 |
|
36 | 36 |
def build_status(host = nil) |
37 |
info = "Cannot find host by id" if host.nil? |
|
38 |
info = "Host not yet created, no reports received" if !host.nil? && host.reports.count < 1 |
|
39 |
info = "Host has invalid configuration" if !host.nil? && (host.reports.count > 1) && host.reports.last.error? |
|
37 | 40 |
status = (!host.nil? && (host.reports.count > 1) && !host.reports.last.error?) |
38 |
{ :build => status } |
|
41 |
{ :build => status, :info => info }
|
|
39 | 42 |
end |
40 | 43 |
end |
41 | 44 |
end |
Also available in: Unified diff
Fixes #15319 - Resolve the compute attributes for nic