Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,558,865
Community Members
 
Community Events
184
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 ?
such as BITBUCKET_REPOSITORY ?

2 answers

1 vote
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 18, 2018

Hi @Mariya,

you can use $BITBUCKT_REPO_SLUG

A full list of environment variables can be found here: https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html

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
TAGS
AUG Leaders

Atlassian Community Events