(Using Bamboo 6.6.1)
I can link to a bitbucket cloud repository and run a build plan associated with that. The plan runs just fine, but the build doesn't show up on bitbucket. On the "Source" page of the repository, on the right side, it shows "0 builds". How do I get the bamboo builds to show up there?
complementing @Alexey Chystoprudov message (assuming you're already using Bitbucket Cloud repository type):
At the end of the build, Bamboo send a POST request to bitbucket in order to update the build status, at this point bitbucket.org performs some form of URL validation on the Base URL (Bamboo Administration >> General Configuration) of your Bamboo instance.
If you are seeing a 400 Bad Request in the <bamboo-home>/logs/atlassian-bamboo.log file (you can search for the [BitbucketBuildStatusUpdater] method) please double check if the Base URL is set to an internal hostname rather than a valid URL. E.g. http://hostname:8085/ instead of http://hostname.com.
The actual response is unfortunately not displayed anywhere accessible in Bamboo but it typically looks like this:
{"type": "error", "error": {"fields": {"url": ["Enter a valid URL."]}, "message": "Bad request"}}
I would check your Base URL first but we can also get the exact response from Bitbucket into the Bamboo logs to confirm what's wrong too:
com.atlassian.bamboo.plugins.bitbucket.impl.BitbucketApiServiceImpl
com.atlassian.bamboo.plugins.bitbucket.events.BitbucketBuildStatusUpdater
The response will get logged to the <bamboo-home>/logs/atlassian-bamboo.log file. You can check there why exactly Bitbucket.org is returning a bad request message.
thanks.
Thanks for the post! This helped me trace my issue with not getting the build status displayed on Bitbucket Cloud pages. Turns out, Bitbucket doesn't accept URLs without a dot/period in them. I feel like it's a new "feature" they implemented on Bitbucket because my old setup without the period used to work just fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. The base URL was using the host name instead of the IP address. Having switched that, it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First of all you should use Bitbucket Cloud repository type. Also to debug you can set DEBUG log level for com.atlassian.bamboo.plugins.bitbucket.events.BitbucketBuildStatusUpdater and check logs if it contains
Updated build status for ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.