Skip to content

Commit

Permalink
Merge pull request #31 from buildkite-plugins/toote_s3_folders
Browse files Browse the repository at this point in the history
S3 folder caching
  • Loading branch information
pzeballos authored Mar 28, 2023
2 parents 3b29581 + b21f7ab commit 074914e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ steps:
- label: ':nodejs: Install dependencies'
command: npm ci
plugins:
- cache#v0.3.1:
- cache#v0.3.2:
manifest: package-lock.json
path: node_modules
restore: file
Expand Down Expand Up @@ -114,7 +114,7 @@ steps:
- label: ':nodejs: Install dependencies'
command: npm ci
plugins:
- cache#v0.3.1:
- cache#v0.3.2:
manifest: package-lock.json
path: node_modules
restore: pipeline
Expand All @@ -123,7 +123,7 @@ steps:
- label: ':test_tube: Run tests'
command: npm test # does not save cache, not necessary
plugins:
- cache#v0.3.1:
- cache#v0.3.2:
manifest: package-lock.json
path: node_modules
restore: file
Expand All @@ -132,7 +132,7 @@ steps:
if: build.branch == "master"
command: npm run deploy
plugins:
- cache#v0.3.1:
- cache#v0.3.2:
manifest: package-lock.json
path: node_modules
restore: file
Expand Down
2 changes: 1 addition & 1 deletion backends/cache_s3
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ save_cache() {

exists_cache() {
if [ -z "$1" ]; then exit 1; fi
aws s3api head-object --bucket "${BUILDKITE_PLUGIN_S3_CACHE_BUCKET}" --key "$(build_key "$1")"
aws s3api list-objects-v2 --bucket "${BUILDKITE_PLUGIN_S3_CACHE_BUCKET}" --prefix "$(build_key "$1")" --max-items 1
}

OPCODE="$1"
Expand Down

0 comments on commit 074914e

Please sign in to comment.