Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
2
-
Description
At present, as per documentation, we have the
POST /rest/build-status/1.0/commits/{commitId}
endpoint that associates a build status with a commit.
However, if you have an older build (ie. not the latest for the given commitId within the same plan), you cannot update its state using this endpoint. If you send such POST request, a new build will be created.
We need a new REST endpoint that would allow updating the older builds, so that we don't have to use the unsupported method of modifying the database, as suggested in the Workaround.
Workaround
- To update the state of an older build (eg. to Failed), find its ID in the BB_BUILD_STATUS table, then execute the following SQL query:
UPDATE BB_BUILD_STATUS SET STATE = 'FAILED' WHERE ID = '<build_ID>'
- If you have already created an additional build using the aforementioned POST request, find its <build_ID> in the same table, then delete it using the following query:
DELETE FROM BB_BUILD_STATUS WHERE ID = '<build_ID>'
Please note
Running SQL queries directly against Bitbucket's database is not a supported approach.
Attachments
Issue Links
- causes
-
PS-83803 Loading...