Bitbucket Pipeline issues due to Artifacts related issues

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

This article describes 2 possible scenarios:

  1. The pipeline step is unable to find artifacts generated in the previous step(s)

  2. The pipeline step is unable to find a specific file from artifacts generated in the previous step(s)

Solution

Scenario 1: The pipeline step is unable to find artifacts generated in the previous step(s)

Possible causes:

  • Artifacts size are more than 1 GB after the compression

Troubleshooting Steps:

Check the size of the artifacts after compression from the Build teardown phase of the build step that generates the artifact. Is the artifacts size more than 1 GB, similar to the screenshot below?

screen showing message Compressed artifact size is 457.8 MiB over the 1 GiB upload limit

YES

  • Only artifacts under 1GB once compressed are saved. This limitation is documented on Use artifacts in steps page. Reduce the artifact size to keep it under the limit.

NO

Raise a Support Ticket and share the Pipeline build URL from bitbucket.org

Scenario 2: The pipeline step is unable to find a specific file from artifacts generated in the previous step(s)

Possible causes:

  • Artifact files are not in the $BITBUCKET_CLONE_DIR directory

Troubleshooting Steps:

Run the ls -lR <directory> command in the Pipeline build step generating the artifact. Here the <directory> is the directory that is being saved as the Artifact. The command should be run after the artifact is generated.

Is the file present in the output of the command or under the $BITBUCKET_CLONE_DIR directory? Below is an example:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 pipelines: default: - step: name: Build and test image: node:10.15.0 script: - npm install - npm test - npm run build - ls -lR dist # identify all files inside dist directory - ls -lR reports # identify all files inside reports directory artifacts: # defining the artifacts to be passed to each future step. - dist/** - reports/*.txt

YES

NO

  • Artifacts files are relative to the BITBUCKET_CLONE_DIR and only the files in the BITBUCKET_CLONE_DIR directory can be configured as artifacts. Also, the files that are inside the directory configured as artifact directory will be saved. Make sure the artifact files are relative to the BITBUCKET_CLONE_DIR and all the files are inside the directory configured as the artifact directory.

Updated on March 26, 2025

Still need help?

The Atlassian Community is here for you.