bitbucket-build-status-notifier-plugin | Notify Bitbucket Cloud with the Jenkins CI build | Continous Integration library
kandi X-RAY | bitbucket-build-status-notifier-plugin Summary
kandi X-RAY | bitbucket-build-status-notifier-plugin Summary
Notify Bitbucket Cloud with the Jenkins CI build status information.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Serialize the given build status to JSON object
- Gets the key
- Gets the state state
- Returns the short description
- Notify listeners that a build has failed
- Creates BitbucketBuild status resources for SCM and SCM
- Attempt to create a BitbucketBuild from a build
- Sends a build status notification to a specific build
- Returns the credentials from the build
- Returns the credentials for the given credentials id
- Gets the credentials id
- Get commit repository map
- Gets the commit repo map
- Notify listeners on finish
bitbucket-build-status-notifier-plugin Key Features
bitbucket-build-status-notifier-plugin Examples and Code Snippets
Community Discussions
Trending Discussions on bitbucket-build-status-notifier-plugin
QUESTION
We're in the process of migrating to Jenkins pipeline. We use Jenkins to update the build status of our branches/PRs in Bitbucket.
One of our merge checks in Bitbucket is "Check the last commit for at least 1 successful build and no failed builds". This means that we can't merge unless there is 1 successful build of the latest commit on Jenkins, and no failed builds of the latest commit.
Sometimes, Jenkins builds fail for reasons unrelated to the code and the build is fine next time you run it. However, this means that the branch can't be merged as there has been at least one failed build.
To get around this, we were previously able to tick the box in the build status notifier plugin configuration that said "Only show latest build status". As of yet, we're unable to find any equivalent way to configure this in a Jenkinsfile. Does anyone know if it's possible, and if so how?
This question is a duplicate of Multi branch pipeline with bitbucket build status notifier plugin in jenkins, but that question was never really answered.
...ANSWER
Answered 2020-Feb-10 at 13:35It seems that your use case it's covered by the Build REST API of Bitbucket, and there is even a step-by-step example of your exact case, being last build failed for external reasons, and a new build succeeds
In order to overwrite the status of an already reported build, you will need to use the same commit sha
and the same key
Regarding the Bitbucket Build Status Notifier, it allows you to specify a buildKey
as an optional parameter. You should make sure to specify this parameter, and that the parameter is always the same for all builds of the same job.
That way, a new build of the same last-commit will overwrite the last one, as it will be using the same sha and the same key.
See the API section of the plugin documentation for additional parameters.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bitbucket-build-status-notifier-plugin
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page