-
Bug
-
Resolution: Not A Defect
-
Critical
-
None
Problem description
Bitbucket Server SCM (com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCM) does not support Poll SCM trigger (hudson.triggers.SCMTrigger) is case of triggering polling by a hook (see the details in https://plugins.jenkins.io/git/#plugin-content-push-notification-from-repository).
Impact
Because of JENKINS-62057, Bitbucket webhook trigger does not work in some cases. In such cases Poll SCM is the only trigger supporting the SCM's field Polling ignores commits in certain paths (PathRestriction). Therefore I set the priority to the same value - critical.
Steps to reproduce
- Create a git repository in Bitbucket Server, e.g.:
https://mybitbucket.example/users/myuser/repos/myrepo/browse
ssh://git@mybitbucket.example:7999/~myuser/myrepo.git - Create a Freestyle Job in Jenkins, e.g. "myfolder/myjob":
- In the Source Code Management section select Bitbucket Server and configure it.
- In the Build Triggers section select Poll SCM and:
- Leave the Schedule field empty.
- Ensure that the Ignore post-commit hooks checkbox is switched off (it is by default).
- Add some step.
- Click Save or Apply.
- Get your access token from your Jenkins administrator (see https://plugins.jenkins.io/git/#plugin-content-push-notification-from-repository).
- Create a Webhook in the git repository in Bitbucket.
- Set some Name.
- Set URL to e.g.:
https://myjenkins.example/git/notifyCommit?url=ssh://git@mybitbucket.example:7999/~myuser/myrepo.git&token=YOUR_ACCESS_TOKEN
- Click Test connection.
- Click View details.
Actual result
No git jobs using repository: ssh://git@mybitbucket.example:7999/~myuser/myrepo.git.
Response details
HTTP status: 200
Headers
Server: Jetty(10.0.15) X-Content-Type-Options: nosniff Connection: keep-alive Content-Length: 198 Date: Tue, 31 Oct 2023 15:53:53 GMT Via: 1.1 localhost (Apache-HttpClient/4.5.13 (cache)) Content-Type: text/plain; charset=ISO-8859-1Body
No git jobs using repository: ssh://git@mybitbucket.example:7999/~myuser/myrepo.git and branches: No Git consumers using SCM API plugin for: ssh://git@mybitbucket.example:7999/~myuser/myrepo.git
Expected result
Scheduled polling of myfolder > myjob.
Response details
HTTP status: 200
Headers
Triggered: https://myjenkins.example/job/myfolder/job/myjob/ Server: Jetty(10.0.15) X-Content-Type-Options: nosniff Connection: keep-alive Content-Length: 165 Date: Tue, 31 Oct 2023 15:56:25 GMT Via: 1.1 localhost (Apache-HttpClient/4.5.13 (cache)) Content-Type: text/plain; charset=ISO-8859-1Body
Scheduled polling of myfolder � myjob No Git consumers using SCM API plugin for: ssh://git@mybitbucket.example:7999/~myuser/myrepo.git