summaryrefslogtreecommitdiff
path: root/docs/api-usage.rst
diff options
context:
space:
mode:
authorMathieu Parent <math.parent@gmail.com>2019-09-05 10:47:34 +0200
committerMathieu Parent <math.parent@gmail.com>2019-09-06 13:41:36 +0200
commitcef3aa51a6928338c6755c3e6de78605fae8e59e (patch)
tree8f28490690f673a6e4a2efea77221dd503a2b20d /docs/api-usage.rst
parentb7f33429c75ed2f464ebd9b4d3c56d3479df3faa (diff)
downloadgitlab-cef3aa51a6928338c6755c3e6de78605fae8e59e.tar.gz
feat: add support for job token
See https://docs.gitlab.com/ee/api/jobs.html#get-job-artifacts for usage
Diffstat (limited to 'docs/api-usage.rst')
-rw-r--r--docs/api-usage.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst
index 2f75584..19b9593 100644
--- a/docs/api-usage.rst
+++ b/docs/api-usage.rst
@@ -19,6 +19,10 @@ To connect to a GitLab server, create a ``gitlab.Gitlab`` object:
# oauth token authentication
gl = gitlab.Gitlab('http://10.0.0.1', oauth_token='my_long_token_here')
+ # job token authentication (to be used in CI)
+ import os
+ gl = gitlab.Gitlab('http://10.0.0.1', job_token=os.environ['CI_JOB_TOKEN'])
+
# username/password authentication (for GitLab << 10.2)
gl = gitlab.Gitlab('http://10.0.0.1', email='jdoe', password='s3cr3t')