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

Gitlab integration - Double job execution

    XMLWordPrintable

Details

    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

          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.

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

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

          I uploaded my job config.xml file.

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

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

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

          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.
          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?

          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?
          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.

          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

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

            Dates

              Created:
              Updated:
              Resolved: