Class: Artifact
- Inherits:
-
Object
- Object
- Artifact
- Defined in:
- lib/buildkiq/artifact.rb
Instance Method Summary collapse
- #find_by(path) ⇒ Object
-
#initialize(job) ⇒ Artifact
constructor
A new instance of Artifact.
- #upload_success? ⇒ Boolean
Constructor Details
#initialize(job) ⇒ Artifact
Returns a new instance of Artifact.
5 6 7 8 |
# File 'lib/buildkiq/artifact.rb', line 5 def initialize(job) @s3_client = Aws::S3::Client.new @job = job end |
Instance Method Details
#find_by(path) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/buildkiq/artifact.rb', line 14 def find_by(path) io = if packaging_zip? fetch_zip_file.find_by_name(path) else fetch_s3_object("/#{path}") end io.read end |
#upload_success? ⇒ Boolean
10 11 12 |
# File 'lib/buildkiq/artifact.rb', line 10 def upload_success? @job.artifact_upload_success? end |