summaryrefslogtreecommitdiff
path: root/docs/gl_objects
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2018-03-17 07:15:35 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2018-03-17 07:15:35 +0100
commit9080f69d6c9242c1131ca7ff84489f2bb26bc867 (patch)
treee4077228e81683d7df2dba95a535385661bbdb61 /docs/gl_objects
parent9cb6bbedd350a2241113fe1d731b4cfe56c19d4f (diff)
downloadgitlab-9080f69d6c9242c1131ca7ff84489f2bb26bc867.tar.gz
Support downloading a single artifact file
Fixes #432
Diffstat (limited to 'docs/gl_objects')
-rw-r--r--docs/gl_objects/builds.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/gl_objects/builds.rst b/docs/gl_objects/builds.rst
index c9b7330..aa28770 100644
--- a/docs/gl_objects/builds.rst
+++ b/docs/gl_objects/builds.rst
@@ -297,7 +297,7 @@ Get a job:
:start-after: # get job
:end-before: # end get job
-Get a job artifact:
+Get the artifacts of a job:
.. literalinclude:: builds.py
:start-after: # artifacts
@@ -316,12 +316,17 @@ stream:
:start-after: # stream artifacts with class
:end-before: # end stream artifacts with class
-In this second example, you can directly stream the output into a file, and unzip it afterwards:
+In this second example, you can directly stream the output into a file, and
+unzip it afterwards:
.. literalinclude:: builds.py
:start-after: # stream artifacts with unzip
:end-before: # end stream artifacts with unzip
+Get a single artifact file::
+
+ build_or_job.artifact('path/to/file')
+
Mark a job artifact as kept when expiration is set:
.. literalinclude:: builds.py