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

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.

Suggest an answer

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

Atlassian Community Events