Skip to content

Error when triggering a pipeline for a merge request: "The resulting pipeline would have been empty" #3076

Answered by JohnVillalovos
hailatGH asked this question in Q&A
Discussion options

You must be logged in to vote

This doesn't sound like a python-gitlab issue to me.

Please look at: https://docs.gitlab.com/ee/api/merge_requests.html#create-merge-request-pipeline

From the first part of the docs there it says:

Create a new pipeline for a merge request. A pipeline created from this endpoint doesn’t run a regular branch/tag pipeline. To create jobs, configure .gitlab-ci.yml with only: [merge_requests].

Also look at https://docs.gitlab.com/ee/ci/yaml/ and search for merge_requests. Looks like it is required to have in the .gitlab-ci.yml a only: merge_requests in your config.

Any reason to not use: https://python-gitlab.readthedocs.io/en/stable/gl_objects/merge_requests.html#merge-request-pipelines ?

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@JohnVillalovos
Comment options

@hailatGH
Comment options

@JohnVillalovos
Comment options

Answer selected by JohnVillalovos
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3075 on January 02, 2025 17:27.