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?

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

              Created:
              Updated: