Problem: we want to update our version number in the pipeline when it runs successfully. We currently pull the version number from the repo's env variables and after a build it should change the variable .
So I was looking at the api and have this:
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{wksp}/{repo}/pipelines_config/variables/{uuid}' \
--user 'user:pwd' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "pipeline_variable",
"uuid": "{uuid}",
"key": "VERSION",
"value": "0.0.0-TEST"
}'
However I get a
{"error": {"message": "Bad request", "detail": "Unexpected response body", "data": {"key": "unexpected.response.body", "arguments": {}}}}I have tried multiple configurations. This is straight from the API docs.
Note that getting the variable works. And I have matched the fields from that.
Thank you!