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

Bitbucket pipeline reuse source code from previous step


@Theodora Boudale 
If in my script in the first step I'm doing:

- git clone -b develop ./../androidClient

 after saving it to the artifacts:

- ./../androidClient

it doesn't save it to artifacts 

Is it possible to reuse the already cloned project in the first step 

1 answer

1 accepted

0 votes
Answer accepted

Hi @Edgar Khimich,

The reason that the clone directory is not saved in artifacts is that it is outside BITBUCKET_CLONE_DIR:

You are cloning the repo in ./../, which is outside the clone directory of the repo where Pipelines is running. Only files in BITBUCKET_CLONE_DIR can be defined as artifacts, so what you can do here is clone the second repo inside BITBUCKET_CLONE_DIR

- git clone -b develop androidClient

and then define the artifact as follows:

- androidClient/**

Kind regards,

You are very welcome @Edgar Khimich.

Just a heads up, I forgot to mention yesterday, I moved your post to a separate question because the topic and your use case are a bit different than the original post where you replied.

Please feel free to let me know if you need anything further!

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,255 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you