I want to set up my bitbucket PRs to only be able to be merged when a certain build completes on my Harness build server. There is a "Required Builds" option on the repo but I don't know what value to put into the "Add Builds" section of the form. The documentation says:
Add any build keys here that will need to successfully pass before merging a pull request. The build key will depend on the CI tool used to generate the build.
But I don't know what the build key is for a build in Harness. I tried the project name and the pipeline identifier but neither work.
Hi @Olga Melnichenko
To user required builds feature, users need Bamboo 7.1+ or with the Bitbucket Integration Plugin version 2.0.0+ in Jenkins. However, any other tool or plugin that uses the "Store a build status" API to publish build results to Bitbucket can still make this feature usable in Bitbucket.
The internal working of this feature is that once the build results reach Bitbucket, the builds are stored in the bb_build_status
table in the database. For this feature to function correctly, the parent
, ref
, and repository_id
columns must have accurate values. Mainly the value sent by CI-CD tool in the parent
field of the JSON is what you search in required builds page. Therefore, you need to verify whether your tool is using the Store a build status API and correctly publishing these details back to Bitbucket.
Regards,
Aman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.