Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger job when an MR is closed #117

Open
albustax opened this issue Feb 16, 2021 · 3 comments
Open

Trigger job when an MR is closed #117

albustax opened this issue Feb 16, 2021 · 3 comments

Comments

@albustax
Copy link

Hello Team,

Thanks for your good work ! Is it possible to trigger a job when an MR is closed ? I have enabled the Merge request events hooks on gitlab side but I can't trigger the job associated when the MR is closed.

Do I have a specific configuration to do ?

@manuschillerdev
Copy link

I think the Job gets triggered (visible in logs), but it is a noop, since jenkins has already built the same version of the branch (only an assumption).

See jenkinsci/gitlab-plugin#1001 in gitlab-plugin for reference. Could this be the same case for gitlab-branch-source-plugin?

@albustax
Copy link
Author

You're right, the job is triggered:

[Tue Feb 16 13:52:31 UTC 2021] Received Merge request !4 closed in project $PROJECT REMOVED event from $IP ⇒ https://$JENKINS_URL/gitlab-webhook/post with timestamp Tue Feb 16 13:52:31 UTC 2021

I agree with you, we need the same behaviour than gitlab-plugin and allow to force rebuild when the option is checked.

@uchagani
Copy link

Similarly, I'd like to trigger the pipeline when MR is approved. right now if i push an update to a branch and the pipeline fails, if i approve the merge request, the pipeline is not triggered again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants