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: 

Can I use BitBucket pipeline env variables in my code?

devender Kumar
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!
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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

TAGS
AUG Leaders

Atlassian Community Events