-
Bug
-
Resolution: Unresolved
-
Major
-
Jenkins 2.303.3
Windows
Plugin 3.1.0
Bitbucket 7.4.9
-----
linux
Jenkins 2.361
Bitbucket Server Integration Plugin 3.3.1
Bitbucket 8.4
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?
- duplicates
-
JENKINS-66581 Implement ChangeRequestSCMHead2 for pull requests
-
- Closed
-
Hi Marco, thanks for the report and apologies for not getting back to you sooner.
I attempted to replicate this locally (using your branch name and selector) and upon creating a PR and pushing a change, the build was triggering as expected.
Can you clarify exactly what your issue is? It sounds like the build is not triggering upon making a change to a PR. The PR update logs you provide look more like the multibranch pipeline scan logs (which show your branch being picked up as expected).
If the build isn't being triggered, could you possibly share access logs from Bitbucket and your Jenkins logs?