• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • jenkins 2.122
      git-plugin 3.9.1

      I want to start job when I have a new commit in branches. So when I have the commits the Jenkins start multiples jobs from the same commit. I don't know why. I am using the regular expression to find the branch. I think the issue is there.

       

       

      Someone have any idea to start job from multiples branches and diferrent commits?

          [JENKINS-51794] Multiple builds start from the same commit

          Mark Waite added a comment - - edited

          Please don't submit questions as bug reports. Use the Jenkins users mailing list or the Internet Relay Chat system. There are far fewer people reading bug reports for individual plugins than read the IRC system or the mailing list.

          If you believe it is a bug, please provide detailed steps which describe how to duplicate the bug.

          Mark Waite added a comment - - edited Please don't submit questions as bug reports. Use the Jenkins users mailing list or the Internet Relay Chat system. There are far fewer people reading bug reports for individual plugins than read the IRC system or the mailing list. If you believe it is a bug, please provide detailed steps which describe how to duplicate the bug.

          Leandro Lima da Silva added a comment - - edited

          Hi Mark,

           

          it's not a question. My report is a bug. If is not clear, summarizing when I use regular expression to select branches, Jenkins trigger several times the same job for the same commit. The Doubt was in relation to some workarround to solve the problem until someone fix the problem. When I select branches without regular expressions it's works fine.

           

          Thanks

          Leandro Lima da Silva added a comment - - edited Hi Mark,   it's not a question. My report is a bug. If is not clear, summarizing when I use regular expression to select branches, Jenkins trigger several times the same job for the same commit. The Doubt was in relation to some workarround to solve the problem until someone fix the problem. When I select branches without regular expressions it's works fine.   Thanks

          Mark Waite added a comment -

          Please provide enough detail to duplicate the bug. Refer to how to report an issue for good guidelines on the information needed in the bug report.

          For example, based on the content you provided above, I can't answer the following questions:

          • What project (job) type is used (Freestyle, Matrix, Maven, Pipeline, Multi-branch Pipeline, ...)?
          • Which source control provider is used (local git server, GitHub, Bitbucket, Visual Studio TFS, Assembla, ...)?
          • What form of notification is configured to detect changes from the source control provider (notifyCommit from a repository hook script, webhook, polling with a specific timing)?
          • How long does the job execute which is running multiple builds for the same commit?
          • Are the commits which are being detected as duplicates a merge commit (multiple parents) or a simple commit (single parent)?
          • Do different but equivalent forms of regex branch name specifications have the same problem (like refs/remotes/origin/hotfix_[0-9]+ or ...)?

          Mark Waite added a comment - Please provide enough detail to duplicate the bug. Refer to how to report an issue for good guidelines on the information needed in the bug report. For example, based on the content you provided above, I can't answer the following questions: What project (job) type is used (Freestyle, Matrix, Maven, Pipeline, Multi-branch Pipeline, ...)? Which source control provider is used (local git server, GitHub, Bitbucket, Visual Studio TFS, Assembla, ...)? What form of notification is configured to detect changes from the source control provider (notifyCommit from a repository hook script, webhook, polling with a specific timing)? How long does the job execute which is running multiple builds for the same commit? Are the commits which are being detected as duplicates a merge commit (multiple parents) or a simple commit (single parent)? Do different but equivalent forms of regex branch name specifications have the same problem (like refs/remotes/origin/hotfix_ [0-9] + or ...)?

          Leandro Lima da Silva added a comment - - edited

          Hi Mark,

           

          follow the infos:

           

          • Freestyle project
          • Gerrit
          • The changes was detect by Pool  SCM schedule settings like this: (H * * * * *)
          • The same commit was trigger the new job one time per hour, as soon as Pool SCM execute.
          • The commits are single commit
          • Yes, the problem happens whenever I use any regular expression. If I simply use the branch name without regular expression the problem doesn't happen

           

          Build #19 - 09:54PM

          Started by an SCM change
          [EnvInject] - Loading node environment variables.
          Building on master in workspace
          [WS-CLEANUP] Deleting project workspace...
          [WS-CLEANUP] Done
          Cloning the remote Git repository
          Seen 23 remote branches
          > git show-ref --tags -d # timeout=10
          Checking out Revision fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 (origin/hotfix_0000)
          > git config core.sparsecheckout # timeout=10
          > git checkout -f fdc6d6e6dc37abe001e6a38516a96d95b121dbf2
          Commit message: "Remove dash"
          > git rev-list --no-walk fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 # timeout=10
          [Gradle] - Launching build.

           

          Build #20 10:54PM

          Started by an SCM change
          [EnvInject] - Loading node environment variables.
          Building on master in workspace
          [WS-CLEANUP] Deleting project workspace...
          [WS-CLEANUP] Done
          Cloning the remote Git repository
          Seen 23 remote branches
          > git show-ref --tags -d # timeout=10
          Checking out Revision fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 (origin/hotfix_0000)
          > git config core.sparsecheckout # timeout=10
          > git checkout -f fdc6d6e6dc37abe001e6a38516a96d95b121dbf2
          Commit message: "Remove dash"
          > git rev-list --no-walk fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 # timeout=10
          [Gradle] - Launching build.

           

          Build #21 11:54PM

          Started by an SCM change
          [EnvInject] - Loading node environment variables.
          Building on master in workspace
          [WS-CLEANUP] Deleting project workspace...
          [WS-CLEANUP] Done
          Cloning the remote Git repository
          Seen 23 remote branches
          > git show-ref --tags -d # timeout=10
          Checking out Revision fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 (origin/hotfix_0000)
          > git config core.sparsecheckout # timeout=10
          > git checkout -f fdc6d6e6dc37abe001e6a38516a96d95b121dbf2
          Commit message: "Remove dash"
          > git rev-list --no-walk fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 # timeout=10
          [Gradle] - Launching build.

           

          Leandro Lima da Silva added a comment - - edited Hi Mark,   follow the infos:   Freestyle project Gerrit The changes was detect by Pool  SCM schedule settings like this: (H * * * * *) The same commit was trigger the new job one time per hour, as soon as Pool SCM execute. The commits are single commit Yes, the problem happens whenever I use any regular expression. If I simply use the branch name without regular expression the problem doesn't happen   Build #19 - 09:54PM Started by an SCM change [EnvInject] - Loading node environment variables. Building on master in workspace [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Done Cloning the remote Git repository Seen 23 remote branches > git show-ref --tags -d # timeout=10 Checking out Revision fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 (origin/hotfix_0000) > git config core.sparsecheckout # timeout=10 > git checkout -f fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 Commit message: " Remove dash " > git rev-list --no-walk fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 # timeout=10 [Gradle] - Launching build.   Build #20 10:54PM Started by an SCM change [EnvInject] - Loading node environment variables. Building on master in workspace [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Done Cloning the remote Git repository Seen 23 remote branches > git show-ref --tags -d # timeout=10 Checking out Revision fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 (origin/hotfix_0000) > git config core.sparsecheckout # timeout=10 > git checkout -f fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 Commit message: " Remove dash " > git rev-list --no-walk fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 # timeout=10 [Gradle] - Launching build.   Build #21 11:54PM Started by an SCM change [EnvInject] - Loading node environment variables. Building on master in workspace [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Done Cloning the remote Git repository Seen 23 remote branches > git show-ref --tags -d # timeout=10 Checking out Revision fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 (origin/hotfix_0000) > git config core.sparsecheckout # timeout=10 > git checkout -f fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 Commit message: "Remove dash" > git rev-list --no-walk fdc6d6e6dc37abe001e6a38516a96d95b121dbf2 # timeout=10 [Gradle] - Launching build.  

          Mathew Joseph added a comment -

          Hi Leandro,
          Did you find a solution or workaround for this? Happens to me as well. Triggers of quite a few builds at the same time.

          Mathew Joseph added a comment - Hi Leandro, Did you find a solution or workaround for this? Happens to me as well. Triggers of quite a few builds at the same time.

            Unassigned Unassigned
            leandrolimasi Leandro Lima da Silva
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: