Skip to content

Commit

Permalink
Match the ccache size to jenkins cache (#97)
Browse files Browse the repository at this point in the history
ccache has a default size of 5GB and will keep the cache below that  value. If the Jenkins cache is smaller (e.g. 4GB) then the cache will be discarded any time it goes above 4GB. Instead we can decrease the ccache size so that the cache should always fit.
  • Loading branch information
MJohnson459 authored Feb 12, 2025
1 parent 019132f commit 5f7391c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ pipeline {
retry(params.retries as Integer) {
docker.withRegistry(params.docker_registry, docker_credentials) { bundle_image.pull() }
}
bundle_image.inside("-v $HOME/tailor/ccache:/ccache -e CCACHE_DIR=/ccache") {
// The cache sizes need to be consistent.
// If the ccache gets larger than the Jenkins size below it will be discarded.
bundle_image.inside("-v $HOME/tailor/ccache:/ccache -e CCACHE_DIR=/ccache -e CCACHE_MAXSIZE=4900M") {
// Invoke the Jenkins Job Cacher Plugin via the cache method.
// Set the max cache size to 4GB, as S3 only allows a 5GB max upload at once
cache(maxCacheSize: 4900, caches: [
Expand Down

0 comments on commit 5f7391c

Please sign in to comment.