Fix up Debug service
This commit is contained in:
parent
2196acb36d
commit
1ee5421d3f
|
@ -6,14 +6,20 @@ module Travis::API::V3
|
||||||
raise NotFound unless job = find(:job)
|
raise NotFound unless job = find(:job)
|
||||||
access_control.permissions(job).debug!
|
access_control.permissions(job).debug!
|
||||||
|
|
||||||
Travis.logger.debug "Reached endpoint"
|
job.config.merge! debug_data
|
||||||
job = service(:find_job, params).run
|
|
||||||
Travis.logger.debug "found job: #{job}"
|
|
||||||
cfg = job.config
|
|
||||||
cfg.merge! debug_data
|
|
||||||
job.save!
|
job.save!
|
||||||
|
|
||||||
accepted(job: job, state_change: :created)
|
accepted(job: job, state_change: :created)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def debug_data
|
||||||
|
{
|
||||||
|
debug: {
|
||||||
|
stage: 'before_install',
|
||||||
|
previous_status: 'failed',
|
||||||
|
created_by: access_control.user
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user