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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,501,486
Community Members
 
Community Events
180
Community Groups

Update bamboo project variable in a task

I have a project variable to store an AWS access key. After rotate access key in task, I want to update the project variable with the new access key, is it possible? The variable is used in deployment projects to access to AWS resources.

1 answer

0 votes

Plan execution can't update Project variable

Thanks the answer.

Is there any way to update Project variables in AWS Lambda?

There's no REST API for project variable update available yet, but you can craft curl command to update it with multiform HTTP POST request

Like Steffen Opel _Utoolity_ likes this

Thanks @Alexey Chystoprudov
I tried to find about the multiform HTTP POST request  but I counts't do it.
Could you give the information of multiform HTTP POST request to update?

Try something like this

curl -u user:password 'http://BAMBOO_URL/project/admin/ajax/updateProjectVariable.action?projectKey=PRJKEY' \
  -H 'x-atlassian-token: no-check' \
  -H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \
  --data-raw ‘variableId=VARIABLE_ID&variableKey=myvar&variableValue=test2&bamboo.successReturnMode=json&confirm=true' 
Like Jae Hun Lee likes this

Thanks, @Alexey Chystoprudov,

Could I use a personal access token instead of using -u user:password?

Unfortunately PAT doesn't work for non REST calls. 

By the way this feature is available by REST API since 8.1.1, see https://docs.atlassian.com/atlassian-bamboo/REST/8.1.1/#d2e288

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events