Class: Buildkite::Artifact
- Inherits:
-
Object
- Object
- OpenStruct
- Object
- Buildkite::Artifact
show all
- Defined in:
- lib/buildkite/models/artifact.rb
Class Method Summary
collapse
-
.delete(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job:, id:) ⇒ Object
-
.download(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job:, id:) ⇒ Object
-
.list(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job: nil) ⇒ Object
-
.retrieve(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job:, id:) ⇒ Object
Methods inherited from Object
#initialize, #to_ostruct
Class Method Details
.delete(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job:, id:) ⇒ Object
26
27
28
|
# File 'lib/buildkite/models/artifact.rb', line 26
def delete(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job:, id:)
Client.delete_request("organizations/#{org}/pipelines/#{pipeline}/builds/#{build}/jobs/#{job}/artifacts/#{id}")
end
|
.download(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job:, id:) ⇒ Object
.list(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job: nil) ⇒ Object
.retrieve(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job:, id:) ⇒ Object
16
17
18
19
|
# File 'lib/buildkite/models/artifact.rb', line 16
def retrieve(org: Buildkite.config.org, pipeline: Buildkite.config.pipeline, build:, job:, id:)
response = Client.get_request("organizations/#{org}/pipelines/#{pipeline}/builds/#{build}/jobs/#{job}/artifacts/#{id}")
Artifact.new response.body
end
|