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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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

Artifact missing - name contains `BITBUCKET_PARALLEL_STEP`

My pipeline looks like that:


- parlell
- step:
- cli-command > /tmp/report-${BITBUCKET_PARALLEL_STEP}.txt
- "/tmp/report-*.txt"

However, the file is not stored as an artifact.

If I remove the parallel step variable, the file is part of the artifacts, but only the last one.


I feel I am missing something here ...


1 answer

1 accepted

0 votes
Answer accepted

Hi @Georg Duemlein,

Every step of a Pipelines build runs in a Docker container, and the repo is cloned in the directory /opt/atlassian/pipelines/agent/build (the clone directory). Only files in the clone directory can be defined as artifacts, if you define as an artifact a file located in /tmp folder it's not going to be uploaded.

I would suggest creating the file inside the clone directory (that's the present working directory when the build runs) or creating a tmp folder inside the clone directory and create the file there. The path you specify in the artifacts section should be relative to the clone directory.

Another thing to keep in mind is that parallel steps cannot use an artifact produced by a step in the same parallel set. If a parallel step produces an artifact, this will be available only to steps following the parallel set.

If you have any questions, please feel free to let me know.

Kind regards,

Ok, that makes sense!

Is the clone directory exposed as an environment variable by any chance?

Or is it safe to assume it doesn't change?

Hi Georg,

The directory is exposed in the variable $BITBUCKET_CLONE_DIR, for reference:

It has been the same path for the last few years. I don't think we can guarantee though we won't ever change it, so I think it's safer to use the environment variable.

Kind regards,

Just a quick note that using the environment variable is not needed for the artifacts definition, and it will not work, first, because the path needs to be relative to the clone dir and, second, because of a bug that the file path in artifacts cannot render variable names. 

If you generate the file in a tmp directory inside the clone dir, a definition like the following should work:

- "tmp/report-*.txt"

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events