I'm working on Gitlab SE & Jenkins integration.

      When I push a commit to my git repository, a new push notification is sent from Gitlab to Jenkins.
      In jenkins the job execution is scheduled twice.

      The first one is correct and seems to be the result of Gitlab push notificación as it states "Started ​by ​GitLab ​push ​by... "

      The second one fails but it is probably started by git-plugin as it states:
      "Started by an SCM change..."
      It fails because the variable "gitlabSourceBranch" is not set. This shows me that this build wasn't started by the gitlab plugin.

      "Poll SCM" trigger is disabled in my job configuration.

      In Jenkins log I see there is only one push notification from Gitlab which is correct.

      I am expecting one push -> one build.

          [JENKINS-36882] Gitlab integration - Double job execution

          Mark Waite added a comment -

          You'll need to provide your job definition to confirm that you truly are not polling for SCM changes. The message seems to indicate that something is causing a poll for SCM changes, and that poll detects a change.

          Mark Waite added a comment - You'll need to provide your job definition to confirm that you truly are not polling for SCM changes. The message seems to indicate that something is causing a poll for SCM changes, and that poll detects a change.

          Facu Mateo added a comment -

          Yes, I know about some bugs in git-plugin that have the same effect and could be related. I will upload my job definition soon

          Facu Mateo added a comment - Yes, I know about some bugs in git-plugin that have the same effect and could be related. I will upload my job definition soon

          Facu Mateo added a comment -

          I uploaded my job config.xml file.

          Facu Mateo added a comment - I uploaded my job config.xml file.

          Mark Waite added a comment -

          I see no polling schedule in the job definition. I don't plan to spend significant time investigating this, since I don't see the problem in my test environments. I'll need to rely on you to identify what settings cause the problem to appear, and what settings cause it to disappear.

          Mark Waite added a comment - I see no polling schedule in the job definition. I don't plan to spend significant time investigating this, since I don't see the problem in my test environments. I'll need to rely on you to identify what settings cause the problem to appear, and what settings cause it to disappear.

          Facu Mateo added a comment - - edited

          I have my environment all setup.
          The job is simple:
          1 - It fetch data from giblab.
          2 - It build a maven project

          I have disabled every option in my configuration. The only 2 plugins currently activated that could cause this problem are git-plugin and gitlabplugin.

          If you have some ideas to try I will test them.

          Facu Mateo added a comment - - edited I have my environment all setup. The job is simple: 1 - It fetch data from giblab. 2 - It build a maven project I have disabled every option in my configuration. The only 2 plugins currently activated that could cause this problem are git-plugin and gitlabplugin. If you have some ideas to try I will test them.

          Robin Müller added a comment -

          Could you please configure a logger for the gitlab-plugin as descibed here and post its output for a double job execution here. With the log we should be able to say if the gitlab-plugin causes the double job execution or if something else in your Jenkins setup is responsible for this.

          Robin Müller added a comment - Could you please configure a logger for the gitlab-plugin as descibed here and post its output for a double job execution here. With the log we should be able to say if the gitlab-plugin causes the double job execution or if something else in your Jenkins setup is responsible for this.

          Owen Mehegan added a comment -

          We track bugs for the GitLab plugin at https://github.com/jenkinsci/gitlab-plugin/issues, could you please file this there if it is still an issue for you?

          Owen Mehegan added a comment - We track bugs for the GitLab plugin at https://github.com/jenkinsci/gitlab-plugin/issues , could you please file this there if it is still an issue for you?

          Facu Mateo added a comment -

          No, it is not an issue anymore. After upgrading jenkins version and plugins the problem is gone.

          Thanks for the support.

          Facu Mateo added a comment - No, it is not an issue anymore. After upgrading jenkins version and plugins the problem is gone. Thanks for the support.

            Unassigned Unassigned
            fmateo Facu Mateo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: