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

Unable to auto merge on successful build using Jenkins CI #186

Closed
jejohns opened this issue Jan 27, 2016 · 14 comments
Closed

Unable to auto merge on successful build using Jenkins CI #186

jejohns opened this issue Jan 27, 2016 · 14 comments
Labels
bug For changelog: Minor bug. Will be listed after features

Comments

@jejohns
Copy link

jejohns commented Jan 27, 2016

I have repos configured via the Jenkins CI service to trigger builds when a merge request is created. If I select the "Merge when build succeeds" option after creating the merge request, the merge request remains in a state where it's indefinitely waiting on a successful build result. While it's stuck in this state, Jenkins has already returned a successful result but the state of the merge request remains unchanged.

auto_merge

I can't tell if it's a issue on the Gitlab side or the Jenkins Gitlab plugin side. I am using Gitlab 8.3.4 with Jenkins Gitlab plugin 1.1.28. I followed the instructions here for setup: http://doc.gitlab.com/ee/integration/jenkins.html

@vstriz
Copy link

vstriz commented Jan 28, 2016

I'm observing exactly same thing.

@kflorence
Copy link

+1

@telisior
Copy link

telisior commented Feb 2, 2016

Same problem for me.
I still observe it on GitLab 8.4.2.

@sebastienbonami
Copy link
Contributor

👍
I think the issue is on GitLab side, so I created this ticket: https://gitlab.com/gitlab-org/gitlab-ce/issues/13269

@ayufan
Copy link
Contributor

ayufan commented Feb 19, 2016

I did check that. The Jenkins plugin should send the ref (just name without the refs/heads or refs/tags) in order for Commit Status and automatic merge to work.

@WonderCsabo
Copy link
Contributor

I am also seeing this bug on Gitlab 8.3 and 8.5.

@ayufan
Copy link
Contributor

ayufan commented Feb 27, 2016

WonderCsabo: Thanks. I'll verify it once again :)

@coder-hugo coder-hugo added the bug For changelog: Minor bug. Will be listed after features label Feb 27, 2016
@coder-hugo
Copy link
Contributor

According to http://doc.gitlab.com/ce/api/commits.html#post-the-build-status-to-a-commit the ref has to be a tag or branch not the commit hash.

@coder-hugo
Copy link
Contributor

Was closed by accident.

@coder-hugo coder-hugo reopened this Feb 27, 2016
@ayufan
Copy link
Contributor

ayufan commented Feb 28, 2016

@coder-hugo Is there anything that I can help with?

@coder-hugo
Copy link
Contributor

@ayufan a bit more of time to work on the plugin would be helpful 😉
I'll hopefully fix this during my code cleanups within the next days.
I just added the last comment and the label to this issue while looking through all open issues to get an overview what needs to be done cause I'm the new lead maintainer since a few days.

@ayufan
Copy link
Contributor

ayufan commented Feb 28, 2016

Awesome. @coder-hugo if you need any help from GitLab side I'm more than happy to help you with that :)

@sebastienbonami
Copy link
Contributor

@coder-hugo I tried a quick fix and it's solving the issue. In GitLabMergeRequest.java: change third parameter of createCommitStatus method from objectAttributes.getLastCommit().getId() to objectAttributes.getSourceBranch(). Tags should also be supported I guess.

Reference: #127 (comment)

@vstriz
Copy link

vstriz commented Mar 15, 2016

Is there any update on this? I have to keep reminding my team to not press that "oh so inviting" button. This would a wonderful feature to have working...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features
Projects
None yet
Development

No branches or pull requests

8 participants