0

Im trying to deploy a plan that has artefacts 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 deploymet call

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

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"

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"}'
Astronaut
  • 6,691
  • 18
  • 61
  • 99
  • You might be able to use: `BASE_BAMBOO_URL/browse//artifact/shared/`. Not the most beautiful solution though, but it works if you know the `buildResultKey`. You should be able to find it programmatically using the REST API. You can properly find some inspiration here: [link](https://stackoverflow.com/questions/39072200/can-i-download-bamboo-built-artifacts-using-bamboo-rest-api) – Jonas Pedersen Jul 18 '18 at 20:05
  • hum that is not what i was asking i want to set variables any kin of variable like i do for a build plan – Astronaut Jul 19 '18 at 14:15

1 Answers1

0

To continue with a request the variables have to be passed as query params... a sad sad reality is that the Bamboo API is very messed up

bamboourl&executeAllStages=true&bamboo.variable.MYVAR=1234

Astronaut
  • 6,691
  • 18
  • 61
  • 99