These are the steps you can use to get the environment results of a deployment. You just need to know the plan-key associated with that deployment.
Ok, you will also need Curl, jq (command-line JSON processor) on a Unix like terminal.
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> \
-X GET -p '<BAMBOO_URL>/rest/api/latest/deploy/environment/<ENVIRONMENT_ID>/results' \
| jq -r '.results[] | "\nCreator: " + .deploymentVersion.creatorDisplayName + "\nBranch: " + .deploymentVersion.planBranchName + "\nDeployment State: " + .deploymentState + "\nLife Cycle State: "+ .lifeCycleState'
Creator: <USER>
Branch: <BRANCH>
Deployment State: <DEPLOYMENT_STATE>
Life Cycle State: <LIFE_CYCLE_STATE>
e.g.
Creator: admin
Branch: master
Deployment State: SUCCESS
Life Cycle State: FINISHED
Daniel Santos
Community Support Engineer
186 accepted answers
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
0 comments