- Notifications
You must be signed in to change notification settings - Fork673
Closed
Labels
Description
Description of the problem, including code/CLI snippet
Gitlab offersTrigger tokens to allow $things to authenticate against the API to only trigger a pipeline. This is currently not possible (or at least I don't see how) with python-gitlab because we first need to authenticate against the Gitlab server.
Expected Behavior
pipeline=gitlab.Project(id).trigger_pipeline('master',token,variables={"DEPLOY":"true"})
Actual Behavior
gl=gitlab.Gitlab('https://gitlab.example-org',private_token=private_token)project=gl.projects.get(id)project.trigger_pipeline('master',trigger_token,variables={"DEPLOY":'true'})
The problem is, that I need to have a valid user account/API token with API privileges to get the project. After that I can use the trigger_token to trigger the pipeline which is kind of counterproductive.
Specifications
- python-gitlab version: 1.8.0
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): 11.8.6-ee