class Jenkins2API::Endpoint::Artifact

This class contains all the calls to reach Jenkins2 and obtain Artifact data

Public Instance Methods

all(name, build_id) click to toggle source

Returns a list of all artifacts for a specific build

Params:

name

Job name

build_id

ID of the build

# File lib/endpoints/artifact.rb, line 13
def all(name, build_id)
  @client.build.get(name, build_id)['artifacts']
end
get(name, build_id, artifact) click to toggle source

Download a specific artifact.

Params:

name

Job name

build_id

ID of the build

artifact

artifact Hash.

This function uses only the relativePath property

Returns with the content of the artifact

# File lib/endpoints/artifact.rb, line 26
def get(name, build_id, artifact)
  @client.api_request(
    :get,
    "/job/#{name}/#{build_id}/artifact/#{artifact['relativePath']}",
    :raw
  )
end