2020-02-13 16:08:59 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
module JobRequest
|
|
|
|
class Response < Grape::Entity
|
|
|
|
expose :id
|
|
|
|
expose :token
|
|
|
|
expose :allow_git_fetch
|
|
|
|
|
|
|
|
expose :job_info, using: Entities::JobRequest::JobInfo do |model|
|
|
|
|
model
|
|
|
|
end
|
|
|
|
|
|
|
|
expose :git_info, using: Entities::JobRequest::GitInfo do |model|
|
|
|
|
model
|
|
|
|
end
|
|
|
|
|
|
|
|
expose :runner_info, using: Entities::JobRequest::RunnerInfo do |model|
|
|
|
|
model
|
|
|
|
end
|
|
|
|
|
2021-03-02 16:11:07 -05:00
|
|
|
expose :runner_variables, as: :variables
|
2020-02-13 16:08:59 -05:00
|
|
|
expose :steps, using: Entities::JobRequest::Step
|
|
|
|
expose :image, using: Entities::JobRequest::Image
|
|
|
|
expose :services, using: Entities::JobRequest::Service
|
|
|
|
expose :artifacts, using: Entities::JobRequest::Artifacts
|
|
|
|
expose :cache, using: Entities::JobRequest::Cache
|
|
|
|
expose :credentials, using: Entities::JobRequest::Credentials
|
|
|
|
expose :all_dependencies, as: :dependencies, using: Entities::JobRequest::Dependency
|
|
|
|
expose :features
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2020-07-29 08:09:45 -04:00
|
|
|
|
|
|
|
API::Entities::JobRequest::Response.prepend_if_ee('EE::API::Entities::JobRequest::Response')
|