Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi.
I've set up a pipeline to generate Flutter APKs. It's working fine except for caching of Flutter dependencies.
Here's my bitbucket-pipelines.yml file with simplified steps for posting here.
image: cirrusci/flutter:latest
pipelines:
custom:
generate-apk:
- step:
name: Flutter lint, test and build
script:
- flutter pub get
caches:
- pubcache
definitions:
caches:
pubcache: $HOME/.pub-cache
Build set up outputs:
Cache "pubcache": Downloading
Cache "pubcache": Not found
If I head over to Pipelines and click on the `Cache` button I see this:
It's definitely there and under the 1GB limit.
Why is it downloading it but then not finding it? Or is it just now downloading it?
Any ideas?
Thanks!
Hi @Julien Dephix,
The defined cache will be saved after the first successful build and it will be used in subsequent builds. Any cache which is older than 1 week will be cleared automatically and repopulated during the next build.
Did you run another build after the first successful build that generated this cache?
Is the following output from a build that ran after the build that generated the cache, or from the build that generated the cache?
Cache "pubcache": Downloading
Cache "pubcache": Not found
Kind regards,
Theodora
I get cache now indeed. Thanks.
I just found it misleading to see it in the dependency caches window.
Bye!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome, I'm glad to have helped!
A step will attempt to download a cache if you have defined a cache for that step in your bitbucket-pipelines.yml file.
If it doesn't find anything because it is the first time it is running with a cache definition, you will see the "Not found" message in the Build setup.
The cache will show in the dependency caches window after it is generated and saved.
If you have any other questions, please feel free to reach out.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.