-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins ver. 2.107.2
bitbucket-branch-source-plugin 2.2.11
-
-
2.2.13
When I create a tag on Bitbucket Cloud the webhook notify Jenkins for a new tag. But the jenkins plugin does not handle it has a SCM event of kind tag but as branch created event.
The PushHookProcessor should be changed (line 165) to check of which kind of event is the notification.
if (change.isClosed()) { result.put(new BranchSCMHead(change.getOld().getName(), type), null); } else { // created is true Reference newChange = change.getNew(); SCMHead head = null; if ("tag".equals(newChange.getType())) { head = new BitbucketTagSCMHead(newChange.getName(), newChange.getDate().getTime(), type); } else { head = new BranchSCMHead(newChange.getName(), type); } ... }
It is also needed add date to the com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketPushEvent.Reference.
I also suggest to configure the ObjectMapper in payload parser (JsonParser) to use the ISO8601DateFormat that comes with jackson instead the custom.
Use a specific deserialiser for BitbucketCloudRepository.updatedOn where BB sends an invalid ISO8601 date format (6 decimal for milliseconds field instead 3 that cause date parse error)
- blocks
-
JENKINS-47254 Support for building tags for Bitbucket Server/Cloud
- Closed
- is related to
-
JENKINS-57516 Bitbucket branch source does not support tag notification
- Resolved
- links to