Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo - REST API - How to pass a variable into a deployment plan ?

Daniel Mendes July 17, 2018

I'm trying to deploy a plan that has artifacts from external service for this I want to download via curl those files that I will pass as variables... however I am not able to set programmaticly the variables with the deployment call

 

For a build plan we can pass it like 

curl -k -u user:passord -X POST -d "bamboo.myVariable=someurl" BASE_BAMBOO_URL/bamboo/rest/api/latest/queue/PROJECT-ID

But trying to do the same with the deployment API fails

curl BASE_BAMBOO_URL/bamboo/rest/api/latest/deploy/project/1321123123 -u user:passord -X POST -d "bamboo.myVariable=callMEwithDATA"

Also trying to add that into the API fails as does trying to pass it thru JSON

curl -X POST BASE_BAMBOO/bamboo/rest/api/latest/deploy/project/1320058 -u user:passord -H "Accepts: application/json" -H "Content-Type: application/json" -d '{"name":"release-1", "myVariable":"ARTEFACT_URL"}'

1 answer

1 vote
Foong
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2018
Daniel Mendes July 24, 2018

Thank you for your reply. I have worked around unfortunately like many things with Bamboo, perhaps it is time to reboot Bamboo, it just feels very old and not flexible at all, the API seems like it was built in total isolation from each other. I am forced to use Bamboo for work, but honestly the amount of time wasted working around it is very sad.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events