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:
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.