Skip to content

Conversation

@s78258819-svg
Copy link
Contributor

Functionality added to trigger a Jenkins Multibranch pipeline scan when a branch is created or deleted for a Bitbucket repository. Testing completed with Jenkins and Bitbucket Data Center for the scenario of creating a new branch for a Bitbucket repository. After refreshing the Jenkins page for the Multibranch pipeline the new branch appears in the multibranch pipeline. In previous versions a manual scan had to be done before the new branch appeared in the multibranch pipeline even though the webhook request was received from Bitbucket during the addition or deletion events.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

Functionality added to trigger a Jenkins Multibranch scan when a branch is added or deleted in bitbucket.
Added a function to capture both the from Hash and change type items that are inside of the payload received from Bitbucket
Functions added get the from hash and change type items from the Bitbucket payload
Added constant variables for the change type values along with the value of an empty hash.  These are used to determine when a branch is being added or deleted.
Updating the plugin repository to have the correct URL for a successful Maven Build
@s78258819-svg
Copy link
Contributor Author

@cdelmonte-zg @julioc-p Hello everyone. Looking to have someone approve this change.

Previously when triggering the scan it was done so for all pipelines. New logic ensures that it only occurs for the repo captured from the payload if it matches the branch source specified in the multibranch pipeline
Functiions have been added to pull http and ssh clone links from bitbucket payload
Added Functions to pull the SSH and HTTP clone links from the Bitbucket payload
Ran into null pointer issue causing issues with other triggers.  Updates made to resolve null pointer occurrence.
@cdelmonte-zg
Copy link
Contributor

Hi @s78258819-svg Sorry for the long delay, I'm gonna merge it in the next days, I hope to release it on 24th November.

@cdelmonte-zg cdelmonte-zg deleted the branch jenkinsci:dev November 24, 2025 11:27
@cdelmonte-zg cdelmonte-zg reopened this Nov 24, 2025
@s78258819-svg
Copy link
Contributor Author

@cdelmonte-zg Hello, I noticed these changes were not merged into the latest release. Is there anything I need to do for the merge to go through?

@cdelmonte-zg cdelmonte-zg merged commit bcbd804 into jenkinsci:dev Nov 30, 2025
19 checks passed
cdelmonte-zg added a commit that referenced this pull request Nov 30, 2025
* Added functionality for Multibranch Scan

Functionality added to trigger a Jenkins Multibranch scan when a branch is added or deleted in bitbucket.

* Added functions for data capture

Added a function to capture both the from Hash and change type items that are inside of the payload received from Bitbucket

* Added full functions for payload data

Functions added get the from hash and change type items from the Bitbucket payload

* Added constant variables

Added constant variables for the change type values along with the value of an empty hash.  These are used to determine when a branch is being added or deleted.

* Update repository URL

Updating the plugin repository to have the correct URL for a successful Maven Build

* Update Logic for Multibranch Pipeline Scan Trigger

Previously when triggering the scan it was done so for all pipelines. New logic ensures that it only occurs for the repo captured from the payload if it matches the branch source specified in the multibranch pipeline

* Adding functions to pull clone links from payload

Functiions have been added to pull http and ssh clone links from bitbucket payload

* Added functions for capturing clone links

Added Functions to pull the SSH and HTTP clone links from the Bitbucket payload

* Update BitBucketPPRJobProbe.java

Ran into null pointer issue causing issues with other triggers.  Updates made to resolve null pointer occurrence.

Co-authored-by: s78258819-svg <s78258819@gmail.com>
@cdelmonte-zg
Copy link
Contributor

@s78258819-svg Thank you and sorry for the long waiting! I just released your changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants