Pipeline build cache 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. Pipeline build is unable to find cache used in the previous builds

  2. Docker image build is not using the Docker cache generated in the previous builds

Solution

Scenario 1: Pipeline build is unable to find cache used in the previous builds

Possible causes:

  • Cache size is more than 1 GB after the compression

Troubleshooting Steps:

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

error message stating the the size is 1.5 GiB

YES

  • Only caches under 1GB once compressed are saved. This limitation is documented on the Caches page. Reduce the cache size to keep it under the limit.

NO

Scenario 2: Docker image build is not using the Docker cache generated in the previous builds

Possible causes:

  • Change in the Dockerfile

Troubleshooting Steps:

Check if there was a change to the Dockerfile after the cache stopped working. Was there a change?

YES

  • Pipeline saves each image layer in the Docker cache. If the Dockerfile changes after the cache are saved, the signature of that intermediate layers will change and the existing saved Docker cache will not be utilized while building the image.

  • To fix the issue, delete the existing cache in Pipelines (Pipelines > Caches > Delete) and trigger the build to generate and save the new cache. This new cache can be usable in the subsequent builds while building the image.

NO

Updated on March 26, 2025

Still need help?

The Atlassian Community is here for you.