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

No build created on PR creation in mulitbranch

XMLWordPrintable

      Update 06-03-2023
      Comment of nicram has a reproducing steps. That's the problem I see also in Jenkins.


      I'm testing that a Pull request creation triggers a build on jenkins in a multi branch pipeline, but no build is started. But pipeline and freestyle jobs it works.

      In the "Multibranch Pipeline Events" log I see the event:

      [Wed Dec 22 16:28:25 CET 2021] Received com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadPullRequestEvent CREATED event from REPO with timestamp Wed Dec 22 16:28:25 CET 2021
       > C:\Program Files\Git\cmd\git.exe rev-parse --resolve-git-dir D:\jenkins_home\caches\git-b61b7506000694e1d0bb86961f485eba\.git # timeout=10
      Setting origin to https://bitbucket.mcrsota.nl/scm/crs-web/REPO.git
       > C:\Program Files\Git\cmd\git.exe config remote.origin.url https://bitbucket.{server}.nl/scm/crs-web/mijncaressionic.git # timeout=10
      Fetching & pruning origin...
      Listing remote references...
       > C:\Program Files\Git\cmd\git.exe config --get remote.origin.url # timeout=10
       > C:\Program Files\Git\cmd\git.exe --version # timeout=10
       > git --version # 'git version 2.34.1.windows.1'
      using GIT_ASKPASS to set credentials BitBucket Service Account for Jenkins
       > C:\Program Files\Git\cmd\git.exe ls-remote -h -- https://bitbucket.{server}.nl/scm/crs-web/REPO.git # timeout=10
      Fetching upstream changes from origin
       > C:\Program Files\Git\cmd\git.exe config --get remote.origin.url # timeout=10
      using GIT_ASKPASS to set credentials BitBucket Service Account for Jenkins
       > C:\Program Files\Git\cmd\git.exe fetch --tags --force --progress --prune -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10
      Checking branches...
      Processed 20 branches
      [Wed Dec 22 16:28:28 CET 2021] com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadPullRequestEvent CREATED event from REPO with timestamp Wed Dec 22 16:28:25 CET 2021 processed in 2.4 sec
      

      On Pr update the build is run:

      [Wed Dec 22 17:22:40 CET 2021] Received com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadPullRequestEvent UPDATED event from REPO with timestamp Wed Dec 22 17:22:31 CET 2021
       > C:\Program Files\Git\cmd\git.exe rev-parse --resolve-git-dir D:\jenkins_home\caches\git-b61b7506000694e1d0bb86961f485eba\.git # timeout=10
      Setting origin to https://bitbucket.{server}.nl/scm/crs-web/REPO.git
       > C:\Program Files\Git\cmd\git.exe config remote.origin.url https://bitbucket.{server}.nl/scm/crs-web/REPO.git # timeout=10
      Fetching & pruning origin...
      Listing remote references...
       > C:\Program Files\Git\cmd\git.exe config --get remote.origin.url # timeout=10
       > C:\Program Files\Git\cmd\git.exe --version # timeout=10
       > git --version # 'git version 2.34.1.windows.1'
      using GIT_ASKPASS to set credentials BitBucket Service Account for Jenkins
       > C:\Program Files\Git\cmd\git.exe ls-remote -h -- https://bitbucket.{server}.nl/scm/crs-web/REPO.git # timeout=10
      Fetching upstream changes from origin
       > C:\Program Files\Git\cmd\git.exe config --get remote.origin.url # timeout=10
      using GIT_ASKPASS to set credentials BitBucket Service Account for Jenkins
       > C:\Program Files\Git\cmd\git.exe fetch --tags --force --progress --prune -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10
      Checking branches...
        Checking branch feature/CRS-94885-Integratie-feature-builds-van-de-11-Jenkins-pipelines-met-Bitbucket-en-Sonar
            ‘Jenkinsfile’ found
          Met criteria
      Changes detected: feature/CRS-94885-Integratie-feature-builds-van-de-11-Jenkins-pipelines-met-Bitbucket-en-Sonar (e13c30e47cdaa617777bdc41a5fa3e4ede7e1024 → 1a2bc0ab0796c2695a1e2675dc95483e6a2d77ff)
      Scheduled build for branch: feature/CRS-94885-Integratie-feature-builds-van-de-11-Jenkins-pipelines-met-Bitbucket-en-Sonar
      Processed 19 branches (query complete)
      [Wed Dec 22 17:22:42 CET 2021] com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadPullRequestEvent UPDATED event from REPO with timestamp Wed Dec 22 17:22:31 CET 2021 processed in 2.6 sec
      

      Pipeline settings:

      for now I only test one branch, but without that is also doesn't work.
      The branch where I make the pull request from exist on the branches page.

      Do I something wrong?

        1. bug-bitbucket-pluging.png
          93 kB
          Marco van Munster
        2. image-2022-04-01-16-42-07-538.png
          69 kB
          Marco van Munster
        3. image-2022-04-01-16-44-54-194.png
          11 kB
          Marco van Munster
        4. image-2022-04-01-16-59-56-785.png
          6 kB
          Marco van Munster
        5. Option.png
          60 kB
          Marco van Munster
        6. Screenshot from 2022-09-29 17-56-55.png
          71 kB
          Marcin Romanowski
        7. Screenshot from 2022-09-29 17-57-44.png
          96 kB
          Marcin Romanowski
        8. Screenshot from 2022-09-29 17-59-04.png
          96 kB
          Marcin Romanowski
        9. Screenshot from 2022-09-29 17-59-40.png
          97 kB
          Marcin Romanowski
        10. Screenshot from 2022-09-29 17-59-54.png
          161 kB
          Marcin Romanowski

            Unassigned Unassigned
            marco_mybit Marco van Munster
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: