Giter VIP home page Giter VIP logo

Comments (20)

loa avatar loa commented on June 11, 2024

Jenkins 1.565.2
GitLab Plugin 1.1.1
GitLab 7.2.1

Gitlab config:

  • Webhook on Merge Requests Events https://jenkins/project/mergereq-behave-byoptimizer
  • Gitlab CI Service https://jenkins/project/mergereq-behave-byoptimizer

Jenkins job mergereq-behave-byoptimizer

  • Build on Push Events
  • Build on Merge Request Events

from gitlab-plugin.

jchristi avatar jchristi commented on June 11, 2024

@loa does your configuration work or do you have the same issue?

My setup is:
Jenkins 1.580
GitLab Plugin 1.1.3
GitLab 7.2

from gitlab-plugin.

loa avatar loa commented on June 11, 2024

@jchristi I have the same issue.

from gitlab-plugin.

bassrock avatar bassrock commented on June 11, 2024

Ok it looks like what is happening, is gitlab sends a merge request event when the merge is closed. Because of this the gitlab-plugin is not filtering out the closed events. it would seem like this line: https://github.com/DABSquared/gitlab-plugin/blob/master/src/main/java/com/dabsquared/gitlabjenkins/GitLabWebHook.java#L317 Is not filtering correctly, possibly because the gitlab api changed or is not sending the right status as I have seen inconsistencies with the api vs. the documentation before.

from gitlab-plugin.

notFloran avatar notFloran commented on June 11, 2024

With Gitlab 7.3, I get this json : https://gist.github.com/notFloran/a5147f558465ebcec552

from gitlab-plugin.

xaniasd avatar xaniasd commented on June 11, 2024

nice, so just adjusting the filter should do the job. Thanks!

from gitlab-plugin.

jchristi avatar jchristi commented on June 11, 2024

A merge request can be closed without being merged, so I assume both of these values are possible.

from gitlab-plugin.

xaniasd avatar xaniasd commented on June 11, 2024

..but a build is not needed any longer so we can safely filter it out.

from gitlab-plugin.

jchristi avatar jchristi commented on June 11, 2024

In both cases it should be filtered, whether merged or closed (but not merged).

from gitlab-plugin.

jchristi avatar jchristi commented on June 11, 2024

@bassrock awesome, thanks :D

from gitlab-plugin.

peternijssen avatar peternijssen commented on June 11, 2024

Good to see it's getting fixed. Had the same issue. Thanks!

from gitlab-plugin.

xaniasd avatar xaniasd commented on June 11, 2024

Accepting a merge does not trigger a build for the merge request event anymore. However, it means that the changes are pushed to the target branch (which subsequently triggers a build). The question is, is this desirable or not? Should we also filter out this build?

from gitlab-plugin.

bassrock avatar bassrock commented on June 11, 2024

@xaniasd I would say that is the correct behavior, because technically a commit and push did happen to the target branch and a user could have scripts meant to run to deploy if its a merge from say bug fix to development.

from gitlab-plugin.

xaniasd avatar xaniasd commented on June 11, 2024

please disregard last comment, wrong commit message :)

from gitlab-plugin.

xaniasd avatar xaniasd commented on June 11, 2024

tested this, seems to be fixed

from gitlab-plugin.

xaniasd avatar xaniasd commented on June 11, 2024

all, is this resolved with the latest version of the plugin? can I close the issue?

from gitlab-plugin.

jchristi avatar jchristi commented on June 11, 2024

@xaniasd I will test with the latest plugin when I get the chance

from gitlab-plugin.

bassrock avatar bassrock commented on June 11, 2024

@jchristi is this still an issue?

from gitlab-plugin.

bassrock avatar bassrock commented on June 11, 2024

Closing do to no comments. Please comment to reopen if it is still an issue.

from gitlab-plugin.

tylersmith34 avatar tylersmith34 commented on June 11, 2024

I see the behavior the OP described and it causes the job to fail when the source branch has been deleted.

GitLab: 7.11.4
Jenkins: 1.580.1
GitLab Plugin: 1.1.23

from gitlab-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.