Artifact

Artifacts can be used to represent data created as a side-effect of running a Jenkins build.

Artifacts are files which are associated with a single build. A build can have any number of artifacts associated with it.

This module provides a class called Artifact which allows you to download objects from the server and also access them as a stream.

class jenkinsapi.artifact.Artifact(filename, url, build)[source]

Represents a single Jenkins artifact, usually some kind of file generated as a by-product of executing a Jenkins build.

get_data()[source]

Grab the text of the artifact

save(fspath)[source]

Save the artifact to an explicit path. The containing directory must exist. Returns a reference to the file which has just been writen to.

Parameters:fspath – full pathname including the filename, str
Returns:filepath
save_to_dir(dirpath)[source]

Save the artifact to a folder. The containing directory must be exist, but use the artifact’s default filename.

Previous topic

User API

Next topic

Build

This Page