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,558,938
Community Members
 
Community Events
184
Community Groups

Get a list of deployment project variables

Hi,

How can I go about to get a list of variables of a Bamboo deployment project?

Appreciate if you could, please, specify the version you are using.

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 18, 2022

Hello @HL

To obtain a list of variables available on a Deployment project you can:

  1. Add a script task to a Job within a Plan and run env on Linux or SET on Windows (or the equivalent PowerShell command)
  2. Add a "Dump variables to log configuration" task to your Plan

Both methods will print the environment variables that are accessible by Bamboo once the Plan is run.

You can then consume those variables in different ways.

Kind regards,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Hi @Eduardo Alvarenga ,

Thanks for your response. Answer is accepted.

I thought the following might be useful for those who are looking for similar solution - I am using version 6.10.3 and Linux elastic agents. The env command "displays" all variables which include:

- standard Linux environment variables

- built in variables

- global variables

...

- and deployment project variables

Except the Linux environment variables, the Bamboo variables are prefixed with bamboo_ 

For example,

build 21-Sep-2022 12:57:45 bamboo_my_dummy_var1=val1
build 21-Sep-2022 12:57:45 bamboo_my_dummy_var2=val2

where my_dummy_var1/2 and val1/2 are my deployment variables and values, respectively.

One might need to use the cut (or another util) command to capture the output of the env command.

Thanks again for your help!!

Like Eduardo Alvarenga likes this
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 20, 2022

Thank you for the details @HL I hope you are having a good experience with Bamboo!

Thank you,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Like Hien likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events