You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48-3Lines changed: 48 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,25 @@ The `BUILDKITE_PLUGIN_FS_CACHE_FOLDER` environment variable defines where the co
71
71
72
72
**IMPORTANT**: the `fs` backend just copies files to a different location in the current agent, as it is not a shared or external resource, its caching possibilities are quite limited.
73
73
74
+
#### Example
75
+
76
+
```yaml
77
+
env:
78
+
BUILDKITE_PLUGIN_FS_CACHE_FOLDER: "/var/cache/buildkite" # Optional: where to store cache on the agent.
79
+
80
+
steps:
81
+
- label: ':nodejs: Install dependencies'
82
+
command: npm ci
83
+
plugins:
84
+
- cache#v1.7.0:
85
+
backend: fs
86
+
path: node_modules
87
+
manifest: package-lock.json
88
+
restore: file
89
+
save: file
90
+
compression: tgz # Optional compression
91
+
```
92
+
74
93
#### `s3`
75
94
76
95
Store things in an S3 bucket. You need to make sure that the `aws` command is available and appropriately configured.
@@ -82,6 +101,29 @@ You also need the agent to have access to the following defined environment vari
82
101
83
102
Setting the `BUILDKITE_PLUGIN_S3_CACHE_ONLY_SHOW_ERRORS` environment variable will reduce logging of file operations towards S3.
84
103
104
+
105
+
#### Example
106
+
107
+
```yaml
108
+
env:
109
+
BUILDKITE_PLUGIN_S3_CACHE_BUCKET: "my-cache-bucket" # Required: S3 bucket to store cache objects
Allows for the cached file/folder to be saved/restored as a single file. You will need to make sure to use the same compression when saving and restoring or it will cause a cache miss.
@@ -190,7 +232,8 @@ steps:
190
232
command: npm ci
191
233
plugins:
192
234
- cache#v1.7.0:
193
-
manifest: package-lock.json
235
+
manifest:
236
+
- package-lock.json
194
237
path: node_modules
195
238
restore: pipeline
196
239
save:
@@ -201,7 +244,8 @@ steps:
201
244
command: npm test # does not save cache, not necessary
0 commit comments