Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to get BITBUCKET Repository name in bitbucket pipeline script

Is there way to get Repository name in bitbucket pipeline script ?
For example we can access branch name is building by using env  $BITBUCKET_BRANCH, similarly is any env variable name for repo name ?

2 answers

1 vote

Hi @Mariya,


A full list of environment variables can be found here:

Is there a reason why $BITBUCKET_REPO_SLUG turns the string to lowercase?
This ist actually a Problem since I need the Slug in the Pipline to create a folder. The Folder is a Pluginname to the same time and if the CamelCase structure does not fit to the files inside the plugin, the plugin wont work. 

Sadly i always have to create project variable with the repo name... 

Is there a way to prevent lowercasing the slug? This would save me from editing the pipeline file for every project!

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events