How can I update the build status from Azure Pipeline to Bitbucket with a custom message and custom values? I've tried below APIs, but they didn't update the build status as expected. My goal is to see the build status reflected in commits and pull requests in Bitbucket.
`
curl -X POST -is -u <USER_NAME>:<APP_PASSWORD> \-H 'Content-Type: application/json' \https://api.bitbucket.org/2.0/repositories/<USER_NAME>/<REPOSITORY_SLUG>/commit/<COMMIT>/statuses/build \-d '{ "state": "SUCCESSFUL", "name": "Build key - description", "url": "https://<AZURE_URL_REFERENCE>", "description": "A general description" }'
Try adding the key attribute to the payload. It's just an arbitrary value.
curl -X POST -is -u <USER_NAME>:<APP_PASSWORD> \-H 'Content-Type: application/json' \https://api.bitbucket.org/2.0/repositories/<USER_NAME>/<REPOSITORY_SLUG>/commit/<COMMIT>/statuses/build \-d '{"key": "my-build", "state": "SUCCESSFUL", "name": "Build key - description", "url": "https://<AZURE_URL_REFERENCE>", "description": "A general description" }'
I tried setting the 'key' but didn't get updated in bitbucket with custom message
@sajo What's the response you get from the request? Any errors?
I attempted to set 'key' but bitbucket didn't display any status code and didn't update the custom message as shown in the screenshot
It looks like you're new here. Sign in or register to get started.