Can I use BitBucket pipeline env variables in my code?

devender Kumar January 8, 2020

Like I have a code file which uses a env variable name PORT. In local I have to export it within system so everything work fines as it is able to access that variable.But I need to pass bitbucket pipeline env variable to be used in place of that how to do this.

 

 

1 answer

0 votes
Raul Gomis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2020

Hi @devender Kumar ,

The pipelines default system variables and other configured variables (repository or account) should be available in your script to use when executing your pipeline. More details: https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html

In local, you will need to export them as you are currently doing with PORT.

Regards, 

Raul

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events