Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ea1eefe

Browse filesBrowse files
author
Gauvain Pocentek
committed
docs: Add an example of trigger token usage
Closes python-gitlab#752
1 parent 794d64c commit ea1eefe
Copy full SHA for ea1eefe

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Open diff view settings
Collapse file

‎docs/gl_objects/builds.rst‎

Copy file name to clipboardExpand all lines: docs/gl_objects/builds.rst
+10Lines changed: 10 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ Full example with wait for finish::
9494
pipeline.refresh()
9595
time.sleep(1)
9696

97+
You can trigger a pipeline using token authentication instead of user
98+
authentication. To do so create an anonymous Gitlab instance and use lazy
99+
objects to get the associated project::
100+
101+
gl = gitlab.Gitlab(URL) # no authentication
102+
project = gl.projects.get(project_id, lazy=True) # no API call
103+
project.trigger_pipeline('master', trigger_token)
104+
105+
Reference: https://docs.gitlab.com/ee/ci/triggers/#trigger-token
106+
97107
Pipeline schedule
98108
=================
99109

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.