Hi everyone!
My question is all about Bamboo REST API.
When I try to create new release via REST API, I get a strange error, and I really see no way to fix it (googled a whole lot, please believe me).
The request itself is set up as per documentation:
curl -H "Content-Type: application/json" -H "Accept: application/json" -u ${bamboo_CI_LOGIN}:${bamboo_CI_PASSWORD} -X POST "https://bamboo.<domain_name>/rest/api/latest/deploy/project/${DEPLOY_ID}/version" --verbose -d @- << EOF
{
"planResultKey": "<build_plan_result_key>-<buildnumber>",
"name": "sometest-1",
"nextVersionName": "sometest-2"
}
EOF
But I get an obscure message for the response that actually explains nothing:
"Can not create version, passed result <build_plan_result_key> has different master than plan associated with deployment project <build_plan_key>"
What is wrong with it? My deployment project is definitely linked with "master" branch, but I can create releases via UI without any need of changing project configuration, just select another branch and its build result and voila! - a fresh new release is here and being deployed.
So what should I do to be able to create release from build results without that nagging error?