Issue
When using the Git SCM Reporting plugin to report build statuses to Bitbucket Cloud (for example, in Multibranch Pipelines), status reporting fails if the generated status key exceeds Bitbucket Cloud’s 40-character limit.
The status key is generated automatically based on job, folder, and branch names. If the resulting key is longer than 40 characters, Bitbucket rejects the request with an HTTP 400 error, and the following warning is logged in the controller’s System Logs:
WARNING com.cloudbees.jenkins.plugins.github_reporting.remote.Bitbucket doCreateCommitStatus could not post build status for <job-path-name> com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: Bad Request HTTP 400 Response: {"type": "error", "error": {"message": "key: Ensure this value has at most 40 characters (it has 83).", "fields": {"key": ["Ensure this value has at most 40 characters (it has 83)."]}}}
Resolution
This issue is resolved in CloudBees CI version 2.568.2.37664. Bitbucket Cloud commit statuses now post successfully even when a long folder or job path produces a status key exceeding 40 characters.
Workaround
If you cannot upgrade immediately, shorten your job or folder names to ensure the auto-generated status key stays under 40 characters.
Tested product/plugin versions
-
CloudBees CI
2.516.3.29358(Affected) -
CloudBees CI
2.568.2.37664(Resolved)