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,500,820
Community Members
 
Community Events
179
Community Groups

Array value on Environment Variables for BitBucket Pipelines

Hi,

Is it possible to set array value on Repository settings > Pipelines > Environment variables?

 

I tried:

(foo bar)

But doesn't work. 

1 answer

1 accepted

1 vote
Answer accepted
mwatson Atlassian Team Aug 28, 2018

Environment variables can have any value, it depends upon how you use them in your scripts. in simple shell scripts you can set a variable to a sequence separated by spaces (the default, lookup the IFS shell variable: https://en.wikipedia.org/wiki/Internal_field_separator)  and then process them as a list, e.g.

 

F="a b c"
for i in ${F}
do
echo $i
done 

When you set the variables value in pipelines, there is no need for the '"'s - only when you set it in the shell. 

Thanks Matthew!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events