我正在尝试为此部署一个具有外部服务伪影的计划,我想通过curl下载将作为变量传递的那些文件...但是我无法通过deploymet调用以编程方式设置变量>
curl -k -u user:passord -X POST -d "bamboo.myVariable=someurl" BASE_BAMBOO_URL/bamboo/rest/api/latest/queue/PROJECT-ID
尝试对部署API进行相同操作
curl BASE_BAMBOO_URL/bamboo/rest/api/latest/deploy/project/1321123123 -u user:passord-X POST -d "bamboo.myVariable=callMEwithDATA"
尝试将其添加到API中失败,尝试通过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"}'
答案 0 :(得分:0)
要继续执行请求,必须将变量作为查询参数进行传递...可悲的现实是Bamboo API非常混乱
bamboourl&executeAllStages = true&bamboo.variable.MYVAR = 1234