Hello @Dmitrij Kultasev
I hope you are doing great!
Let me share a couple of steps you can use to get this information knowing just the plan associated with a given deployment.
curl -u <USER>:<PASSWORD> \It should give you a result like:
-X GET -p <BAMBOO_URL>/rest/api/latest/deploy/project/forPlan?planKey=<PLAN-KEY> \
| jq -r '.[] | "Name: " + .name + "\tdeploymentId: " + (.id|tostring)'
Name: <DEPLOYMENT_NAME> deploymentId: <DEPLOYMENT_ID>
curl -u <USER>:<PASSWORD> \As a result, you should get:
-X GET -p '<BAMBOO_URL>/rest/api/latest/deploy/project/<DEPLOYMENT_ID>' \
| jq -r '.environments[] | "Name: " + .name + "\tenvironmentId: " + (.id|tostring)'
Name: <ENVIRONMENT_NAME> environmentId: <ENVIRONMENT_ID>
curl -u <USER>:<PASSWORD> \This one should give you the deploymentResultId you need:
-X GET -p '<BAMBOO_URL>/rest/api/latest/deploy/environment/<ENVIRONMENT_ID>/results' \
| jq -r '.results[] | "Version" + .deploymentVersionName + "\tdeploymentResultId:" + (.id|tostring)'
Version: release-XX deploymentResultId: <ENVIRONMENT_RESULT_ID>
I hope that helps.
@Daniel Santos that's not what I needed. That's the ID I'm looking for to be used in /deploy/result/{deploymentResultId} .
I might go wrong direction, but I want to find last successful deployment for specific plan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please give the steps above a chance. They will give you exactly a list of deploymentResultIds for a given environment.
This is the relationship between the plan and a given deploymentResultId:
I just tested these steps again. They should give you exactly what you want.
Please let me know if you face any issues to follow them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries, sorry for not being clear in my first message.
I see you in the next thread!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.