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, relative_path=None)¶ Represents a single Jenkins artifact, usually some kind of file generated as a by-product of executing a Jenkins build.
-
get_data
()¶ Grab the text of the artifact
-
save
(fspath, strict_validation=False)¶ 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, strict_validation=False)¶ Save the artifact to a folder. The containing directory must exist, but use the artifact’s default filename.
-