Forums

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

Why "clone: false" is not only controlling the repo cloning but also availability of artifacts?

Alexander Arendar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 4, 2025

When me, as a new user of Bitbucket pipelines, see a step option "clone: false" I suggest that this should control if that particular step clones the repo. In now way it suggests/hints that this also could mean that artifacts from previous steps will not be available. But in reality the semantics is that it will make that step unable to have those artifacts.
My question is simple: why is that designed in that way?

I have a pipeline with some steps that actually don't need my repo files, but they do need some of produces by previous steps files, namely test reports. I was curious if I can somehow optimize the pipeline time. So naturally I thought "ok, the step which uploads my test report to the S3 does not actually need the repo". Ok, then I found that there is an option "clone: false". I thought "great, that will do". And then I realized that my test reports, which are not part of my repo, and which are passed as artifacts, are not available if i add "clone: false" to my S3 upload step.

Maybe I am not experienced enough but that design choice looks a bit weird to me. Cloning the repo is one thing, and artifacts is another thing.


Would be great to hear from the community.

1 answer

0 votes
Derick Downey September 5, 2025

Hmmm I am also using `clone: false` in my YML file and just doing things in a designated folder on the runner, not in the build container that's created/destroyed for each step. I always navigate out of the build container immediately. Then at the end of my step, I move all of my files that I want as "artifacts" from the designated folder on the runner back into the build container, into the "artifacts" folder location that I called out in the YML file. I am only doing one step, so I do not know if it is passing the artifacts to the next step/runner, but I do know that I can download them from the pipeline's results page:

artifacts.png

Here's an example of how my YML file starts:

clone:
enabled: false


definitions:
steps:

- step: &build-test
name: Build Test
runs-on:
- self.hosted
- windows
script:
- . $Env:RUNNER_PIPELINES_ROOT\steps\buildTest.ps1
artifacts:
- BuildErrors\**
- BuildLogs\**
- BuildOutput\**
- PipelineLog\**

In order to find the "BuildErrors" artifacts folder I do something like this in PowerShell:

"${Env:BITBUCKET_CLONE_DIR}\BuildErrors"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events