You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hi folks,
My pipeline build is unable to persist the $HOME/.cache directory across builds, hence running very slowly. Can someone find any errors in the caching setup below?
Log message in the "Build setup" phase:
Cache "mytool-cache-dir: $HOME/.cache": Downloading
Cache "mytool-cache-dir: $HOME/.cache": Not found
image: atlassian/default-image:4
pipelines:
default:
- step:
name: 'geofeed-finder wtf'
size: 2x
caches:
-mytool
-cache-dir
script:
- $HOME/bin/mytool
-linux-x64 -v
- echo "Startingmytool
"
- $HOME/bin/mytool
-linux-x64 -c 1 -g 1 --keep-non-iso --keep-invalid-subdivisions --download-timeout 10 -o $HOME/latest.csv
- echo "Finishedmytool
"
- wc -l $HOME/latest.csv
artifacts: # defining the artifacts to be passed to each future step.
- $HOME/latest.csv
definitions:
caches:mytool
-cache-dir: $HOME/.cache
I realized after posting this that the $PWD is not $HOME, which is my assumption in the above script. So I remove $HOME relative paths and let them be either relative to $(pwd) (present working directory) or better still the $BITBUCKET_CLONE_DIR variable.
So now both the cache works and the artefacts are found correctly after the build is done. Yay!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.