The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it true if I set variable in repository variables only ?

Amir Aziz
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!
April 7, 2025

Actually, my development env variables are same as production env variables. So, Is it enough to set variables in repository variables only? No need to set same variables in deployment again.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
John Emmanuel
Contributor
April 8, 2025
No, you don’t need to redefine the variables again in your pipeline. Bitbucket deployment variables allow you to define different values for the same key, scoped to specific environments like staging or production.

If the variable value is the same across all environments, you can simply define it at the repository level and skip the deployment variable section.

For example, you can reference $INSTANCE_ID in your pipeline YAML, and configure different values for it in each deployment environment — Bitbucket will automatically use the one that matches the current deployment.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events