Skip to content

Commit

Permalink
refactor(containers): make the cache bucket configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
plumpy committed Feb 18, 2020
1 parent ce609b1 commit 5623804
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dev/buildtool/cloudbuild/containers-build-java8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- id: restoreCache
name: $_DOCKER_REGISTRY/restore_cache:latest
args:
- "--bucket=gs://spinnaker-build-cache"
- "--bucket=gs://$_COMPILE_CACHE_BUCKET"
- "--key=$_IMAGE_NAME-$_BRANCH_NAME"
- id: buildCompileImage
waitFor: ["restoreCache"]
Expand All @@ -15,7 +15,7 @@ steps:
waitFor: ["compile"]
name: $_DOCKER_REGISTRY/save_cache:latest
args:
- "--bucket=gs://spinnaker-build-cache/"
- "--bucket=gs://$_COMPILE_CACHE_BUCKET"
- "--key=$_IMAGE_NAME-$_BRANCH_NAME"
- "--path=.gradle/caches"
- "--path=.gradle/wrapper"
Expand Down Expand Up @@ -65,3 +65,5 @@ images:
timeout: 3600s
options:
machineType: N1_HIGHCPU_8
substitutions:
_COMPILE_CACHE_BUCKET: spinnaker-build-cache
6 changes: 4 additions & 2 deletions dev/buildtool/cloudbuild/containers-tag-java8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- id: restoreCache
name: gcr.io/$PROJECT_ID/restore_cache:latest
args:
- "--bucket=gs://spinnaker-build-cache"
- "--bucket=gs://_COMPILE_CACHE_BUCKET"
- "--key=$_IMAGE_NAME-$_BRANCH_NAME"
- id: buildCompileImage
waitFor: ["restoreCache"]
Expand All @@ -15,7 +15,7 @@ steps:
waitFor: ["compile"]
name: $_DOCKER_REGISTRY/save_cache:latest
args:
- "--bucket=gs://spinnaker-build-cache/"
- "--bucket=gs://_COMPILE_CACHE_BUCKET"
- "--key=$_IMAGE_NAME-$_BRANCH_NAME"
- "--path=.gradle/caches"
- "--path=.gradle/wrapper"
Expand Down Expand Up @@ -49,3 +49,5 @@ images:
timeout: 3600s
options:
machineType: N1_HIGHCPU_8
substitutions:
_COMPILE_CACHE_BUCKET: spinnaker-build-cache

0 comments on commit 5623804

Please sign in to comment.