The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket pipeline reuse source code from previous step

Edgar Khimich
Contributor
September 10, 2021

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

- git clone -b develop git@bitbucket.org:project/my-android-client.git ./../androidClient

 after saving it to the artifacts:

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2021

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 git@bitbucket.org:project/my-android-client.git androidClient

and then define the artifact as follows:

artifacts:
- androidClient/**

Kind regards,
Theodora

Edgar Khimich
Contributor
September 13, 2021

@Theodora Boudale Thank you 

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 14, 2021

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,
Theodora

TAGS
AUG Leaders

Atlassian Community Events