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

Can we store a file as secret in bitbucket, where all the secret variables could be defined ?

Shishir Mathur
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Sep 20, 2023

As per what's mentioned in the doc -

https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/

There is no way mentioned to store all the secret variables in a single file and then expose that file altogether to the pipeline.

Defining each variable as a separate secrets means we need to update the pipeline script every time a new variable is added. However, if there were a file to hold all the secrets and dynamically expose all those secret variables, we won't need to update the script every time a new variable is added.

FWIW, this is similar to to what is followed in case of Flutter -

Individually defining each variable -

--dart-define=someVariable=someValue --dart-define=otherVariable=otherValue --dart-define=thirdVariable=thirdValue

 VS

Defining them all in one file -

--dart-define-from-file=<use-define-config.json>

 So, is there a way to achieve the similar thing (to dart-define-from-file) in bitbucket secrets ?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 22, 2023

Hi Shishir and welcome to the community!

I'm afraid that this is not possible at the moment.

You mention the following:

Defining each variable as a separate secrets means we need to update the pipeline script every time a new variable is added. However, if there were a file to hold all the secrets and dynamically expose all those secret variables, we won't need to update the script every time a new variable is added.

I don't understand how using a file to hold all secrets would eliminate the need to edit the pipeline script. Even if the secret file solution were possible, wouldn't you still need to edit the pipeline script to reference the new variable? Could you please clarify what you mean, perhaps with an example?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events