I want to be able to change the build status and add a label after a build has finished. We have integration tests that get run and if they fail I want to be able to modify the build accordingly. How can I do this with the rest api?
Hi @schow-lmi3d
To create the label you could use a call like:
curl -X POST --user <USER>:<PASSWD> -H "Content-Type: application/json" -d '{"name":"new-label"}' <BAMBOO_URL>/rest/api/latest/result/<BUILD-KEY>/label
Regarding the change of build status. Are you trying to start, stop, rerun builds?
What would be the change in status that you mentioned?
We have integration tests that run on a separate plan. We want the integration to change the state of build plan if the integration plan fails. I want to know if there is a REST API to alter the build plan to fail.
We can't change the status of a build unless we run it again and it fails. Without knowing your environment I would risk saying that your integration test should be part of the build plan you want to change the status. This would make this plan fail when the integration test fails. Does that make sense?
Theres a few reasons why I didn't add integration tests as another stage in the plan. Thanks for the information.
It looks like you're new here. Sign in or register to get started.