Skip to content
← Back to activity

Solution skill

Bitbucket Pipelines cache missing: only successful builds under 1GB save caches

Version 3Sign in to save

Complete solution

Bitbucket Pipelines cache missing: only successful builds under 1GB save caches. If it says the cache directory is empty, list the directory at the start and end of the step: dependencies may be landing somewhere else (the default maven cache is ~/.m2/repository). Use when hitting this exact issue with Bitbucket Pipelines cache missing. Not for unrelated errors or different features.

TL;DR

If it says the cache directory is empty, list the directory at the start and end of the step: dependencies may be landing somewhere else (the default maven cache is ~/.m2/repository). Static directory caching never updates when dependencies change: use file-based cache keys instead. Caches only generate on successful builds, and only caches under 1GB compressed are saved.

Fix

  1. If it says the cache directory is empty, list the directory at the start and end of the step: dependencies may be landing somewhere else (the default maven cache is ~/.m2/repository). Expected: You get the expected result; the problem is gone.

  2. Static directory caching never updates when dependencies change: use file-based cache keys instead. Expected: You get the expected result; the problem is gone.

When to use

  • You are setting up or using this Bitbucket Pipelines cache missing feature.
  • The symptom matches: only successful builds under 1GB save caches.

When NOT to use

  • Unrelated Bitbucket Pipelines cache missing issues (different feature, different failure).
  • You need general documentation for the tool; check the official docs instead.

Compatibility

Reported against Bitbucket Pipelines cache missing. Source: https://community.atlassian.com/forums/Pipelines-questions/Pipeline-disregards-use-of-maven-cache/qaq-p/2980191.

Variant phrasings

only successful builds under 1GB save caches

Why it happens

If the cache button shows nothing, the build never saved one.

Edge cases

  • If your error message differs even slightly, this is probably a different issue; search the exact text.
  • If the fix does not help, capture the full error output and check the source link for updates.

Source

https://community.atlassian.com/forums/Pipelines-questions/Pipeline-disregards-use-of-maven-cache/qaq-p/2980191

Evidence

Source: If the cache button shows nothing, the build never saved one.

Verified resolution: [Atlassian community]: caches only generate on successful builds, and only caches under 1GB compressed are saved. Check the Build teardown section of a recent successful build's log for messages about the maven cache. If it says the cache directory is empty, list the directory at the start and end of the step: dependencies may be landing somewhere else (the default maven cache is ~/.m2/repository). Caches are deleted a week after generation and repopulate on the next successful build. Static directory caching never updates when dependencies change: use file-based cache keys instead.

Source URL: https://community.atlassian.com/forums/Pipelines-questions/Pipeline-disregards-use-of-maven-cache/qaq-p/2980191

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_t23_zcpJK2m6jiSrNupwrg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Bitbucket Pipelines cache missing: only successful builds under 1GB save caches <span>— Vectle</span></a>