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 build only when new commits were pushed to MR #998

Merged

Conversation

ababushk
Copy link
Contributor

This PR resolves the problem described in #871 and #926
An option in trigger configuration was added - when set build will be started on MR update only if it has new commits pushed to source branch. However, in current implementation build won't start when work in progress merge request become non-WIP MR.
I can use some help to write tests and fix the issue with WIP merge requests.

ababushk and others added 7 commits October 23, 2019 00:16
# Conflicts:
#	src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java
#	src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerFactory.java
#	src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerImpl.java
@ababushk
Copy link
Contributor Author

ababushk commented Dec 2, 2019

Hi @anton-johansson! Thank you very much for changes introduced in #903! They were exactly what I needed to finish this PR and I had no idea how to implement them by myself. If you have some spare time I humbly ask you to review this PR because I think it can interfere with your changes (I've tried to resolve conflicts as accurate as possible)

@ababushk
Copy link
Contributor Author

ababushk commented Dec 2, 2019

@anton-johansson it did interfere with your changes, so I slightly changed a condition and now MR will be built anyway if force build labels were set

@slyalin
Copy link

slyalin commented Jan 21, 2020

Can we assign someone to review and merge changes? It is a very desired fix.

@ababushk
Copy link
Contributor Author

@markyjackson-taulia can you please take a look?

@markjacksonfishing markjacksonfishing merged commit 5e6eede into jenkinsci:master Feb 9, 2020
@ababushk
Copy link
Contributor Author

Thank you @markyjackson-taulia !

@ababushk ababushk deleted the trigger_only_with_new_commits branch February 20, 2020 18:41
@sandeepnagori87
Copy link

@ababushk was this issue "However, in current implementation build won't start when work in progress merge request become non-WIP MR." fixed as well?

I see that when we move MR from "WIP" to Ready, pipeline does not start

@ababushk
Copy link
Contributor Author

@sandeepnagori87 It's been a while, so I don't remember details, but according to

it was fixed and should work.

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

Successfully merging this pull request may close these issues.

4 participants