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

how to change bitbucket pipeline default clone directory

Daniele Piaggesi April 17, 2017

Hi all

probably is not a new question, but I didn't find anything useful, then I ask.

I need to change the pipeline default clone directory, that by default is 

 

/opt/atlassian/pipelines/agent/build

I read here https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html and it seems that the variable is:

 

BITBUCKET_CLONE_DIR

I tried to set this in Settings >> Pipeline >> Environment page of my bitbucket project, but no way.

 

What am I doing wrong?

Thanks in advance.

Daniele

 

3 answers

0 votes
Mattia Fiumara January 14, 2021

I'm looking to checkout the git source repo into a subfolder would that be possible to implement?

0 votes
Diego Martinez December 13, 2019

Other case: path length limitations on Linux when you are compiling huge amount of source code with a lot of sub-folders like the Linux Kernel using Yocto or Buildroot. 

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2017

Hi Daniele,

The $BITBUCKET_CLONE_DIR variable is for referencing the path so we have the flexibility to change clone dir if needed. It's for internal use only. It's referenced in the article because you can *use* that variable, but it wouldn't make sense to change the value.

If there's a reason why you consider necessary to change the default clone directory, you can submit a Feature request at https://bitbucket.org/site/master/issues?status=new&status=open so we can consider it for future implementation.

Hope this helps!

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2017

Just to emphasize this in case it wasn't clear enough in my previous comment, the variable is for customers to use but it's read only, it can only be modified by Atlassian.

Cheers,

Ana

 

Markus Mahlberg May 22, 2019

One use case: We want to test ansible roles using molecule. If the code does not reside in a directory matching the role name, the build fails.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events