Skip to content

Conversation

s78258819-svg
Copy link

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
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.
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.

1 participant