Skip to content

Commit 074914e

Browse files
authored
Merge pull request #31 from buildkite-plugins/toote_s3_folders
S3 folder caching
2 parents 3b29581 + b21f7ab commit 074914e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ steps:
1313
- label: ':nodejs: Install dependencies'
1414
command: npm ci
1515
plugins:
16-
- cache#v0.3.1:
16+
- cache#v0.3.2:
1717
manifest: package-lock.json
1818
path: node_modules
1919
restore: file
@@ -114,7 +114,7 @@ steps:
114114
- label: ':nodejs: Install dependencies'
115115
command: npm ci
116116
plugins:
117-
- cache#v0.3.1:
117+
- cache#v0.3.2:
118118
manifest: package-lock.json
119119
path: node_modules
120120
restore: pipeline
@@ -123,7 +123,7 @@ steps:
123123
- label: ':test_tube: Run tests'
124124
command: npm test # does not save cache, not necessary
125125
plugins:
126-
- cache#v0.3.1:
126+
- cache#v0.3.2:
127127
manifest: package-lock.json
128128
path: node_modules
129129
restore: file
@@ -132,7 +132,7 @@ steps:
132132
if: build.branch == "master"
133133
command: npm run deploy
134134
plugins:
135-
- cache#v0.3.1:
135+
- cache#v0.3.2:
136136
manifest: package-lock.json
137137
path: node_modules
138138
restore: file

backends/cache_s3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ save_cache() {
2727

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

3333
OPCODE="$1"

0 commit comments

Comments
 (0)