Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36882

Gitlab integration - Double job execution

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          markewaite 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.

          Show
          markewaite 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.
          Hide
          fmateo 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

          Show
          fmateo 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
          Hide
          fmateo Facu Mateo added a comment -

          I uploaded my job config.xml file.

          Show
          fmateo Facu Mateo added a comment - I uploaded my job config.xml file.
          Hide
          markewaite 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.

          Show
          markewaite 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.
          Hide
          fmateo 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.

          Show
          fmateo 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.
          Hide
          coderhugo 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.

          Show
          coderhugo 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.
          Hide
          owenmehegan 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?

          Show
          owenmehegan 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?
          Hide
          fmateo 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.

          Show
          fmateo 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.

            People

            • Assignee:
              Unassigned
              Reporter:
              fmateo Facu Mateo
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: