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,463,883
Community Members
 
Community Events
176
Community Groups

Repository cloning path with a Windows runner pipeline

I am triying to create a custom pipeline with Bitbucket by using a Windows runner (on my own PC) in order to automate my building process on Unity game engine.

I have configured the bitbucket-pipelines.yml and the runner correctly, but I need to know the exact path where my repository is been cloned in order to open the Unity project.

I cannot find the local repository because it seems to be cleared after the step has been executed.

 

The "script" section of my step on the bitbucket-pipelines.yml file looks like this:

 

Start-Process -wait -FilePath C:\"Program Files"\Unity\Hub\Editor\2020.3.2f1\Editor\Unity.exe -ArgumentList "-batchmode","-nographics", "-quit", "logFile ./logbuild.log","-projectPath [THIS IS THE UNKNOWN INFO]", "-executeMethod BuildScript.PerformBuild"
Which is the exact path where the project is been cloned?
Thank you so much.

1 answer

Hi @Kiko_BZ,

The path where a repo is cloned when using a Windows runner is

{Path-to-atlassian-runner-dir}\atlassian-bitbucket-pipelines-runner\temp\{runner-uuid}\{some-number}\build

where
{Path-to-atlassian-runner-dir} is the path to the directory where you have the atlassian-bitbucket-pipelines-runner directory
{runner-uuid} is the UUID of the runner you are using
{some-number} is based on the EPOCH time, when the build gets started


You can create a variable during the build (in the script of your bitbucket-pipelines.yml file), get the location of the current directory (which is the clone directory), and then use that variable:

- $curDir=Get-Location
- Write-Host "$curDir"

I used the latter command to print the value of $curDir variable.

Is this something that works for you?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events