Put debug options in debug_otions
This depends on https://github.com/travis-ci/travis-migrations/pull/7
This commit is contained in:
parent
05e860dd35
commit
ba142b84c7
|
@ -2,12 +2,13 @@ module Travis::API::V3
|
|||
class Models::Job < Model
|
||||
|
||||
self.inheritance_column = :_type_disabled
|
||||
|
||||
|
||||
has_one :log, dependent: :destroy
|
||||
belongs_to :repository
|
||||
belongs_to :commit
|
||||
belongs_to :build, autosave: true, foreign_key: 'source_id'
|
||||
belongs_to :owner, polymorphic: true
|
||||
serialize :config
|
||||
serialize :debug_options
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Travis::API::V3
|
|||
raise WrongCredentials unless Travis.config.debug_tools_enabled or Travis::Features.active?(:debug_tools, job.repository)
|
||||
access_control.permissions(job).debug!
|
||||
|
||||
job.config.merge! debug_data
|
||||
job.debug_options = debug_data
|
||||
job.save!
|
||||
|
||||
query.restart(access_control.user)
|
||||
|
@ -19,12 +19,10 @@ module Travis::API::V3
|
|||
|
||||
def debug_data
|
||||
{
|
||||
debug: {
|
||||
stage: 'before_install',
|
||||
previous_state: job.state,
|
||||
created_by: access_control.user.login,
|
||||
quiet: params["quiet"] || false
|
||||
}
|
||||
stage: 'before_install',
|
||||
previous_state: job.state,
|
||||
created_by: access_control.user.login,
|
||||
quiet: params["quiet"] || false
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user