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
+39-18Lines changed: 39 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ RUN echo 'my expensive build step'
27
27
steps:
28
28
- command: echo wow
29
29
plugins:
30
-
- seek-oss/docker-ecr-cache#v2.1.1
30
+
- seek-oss/docker-ecr-cache#v2.2.0
31
31
- docker#v3.12.0
32
32
```
33
33
@@ -52,7 +52,7 @@ RUN npm install
52
52
steps:
53
53
- command: npm test
54
54
plugins:
55
-
- seek-oss/docker-ecr-cache#v2.1.1:
55
+
- seek-oss/docker-ecr-cache#v2.2.0:
56
56
cache-on:
57
57
- package.json # avoid cache hits on stale lockfiles
58
58
- package-lock.json
@@ -67,7 +67,7 @@ The `cache-on` property also supports Bash globbing with `globstar`:
67
67
steps:
68
68
- command: npm test
69
69
plugins:
70
-
- seek-oss/docker-ecr-cache#v2.1.1:
70
+
- seek-oss/docker-ecr-cache#v2.2.0:
71
71
cache-on:
72
72
- '**/package.json' # monorepo with multiple manifest files
73
73
- yarn.lock
@@ -76,6 +76,27 @@ steps:
76
76
- /workdir/node_modules
77
77
```
78
78
79
+
It also supports caching on specific JSON keys which can be specified following a `#` character using [jq syntax](https://jqlang.github.io/jq/manual/#object-identifier-index). This requires [jq](https://jqlang.github.io/jq/) to be installed on the build agent. This implementation works by matching on the first `.json#` substring.
80
+
81
+
A given entry cannot contain both bash globbing and a jq path.
82
+
83
+
```yaml
84
+
steps:
85
+
- command: pnpm test
86
+
plugins:
87
+
- seek-oss/docker-ecr-cache#v2.2.0:
88
+
cache-on:
89
+
- .npmrc
90
+
- package.json#.dependencies
91
+
- package.json#.devDependencies
92
+
- package.json#.packageManager
93
+
- package.json#.pnpm.overrides
94
+
- pnpm-lock.yaml
95
+
- docker#v3.12.0:
96
+
volumes:
97
+
- /workdir/node_modules
98
+
```
99
+
79
100
### Using another Dockerfile
80
101
81
102
It's possible to specify the Dockerfile to use by:
@@ -84,7 +105,7 @@ It's possible to specify the Dockerfile to use by:
84
105
steps:
85
106
- command: echo wow
86
107
plugins:
87
-
- seek-oss/docker-ecr-cache#v2.1.1:
108
+
- seek-oss/docker-ecr-cache#v2.2.0:
88
109
dockerfile: my-dockerfile
89
110
- docker#v3.12.0
90
111
```
@@ -95,7 +116,7 @@ Alternatively, Dockerfile can be embedded inline:
Your `Dockerfile.secondary` can then [dynamically use these args](https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact):
@@ -152,7 +173,7 @@ stage to run commands against:
152
173
steps:
153
174
- command: cargo test
154
175
plugins:
155
-
- seek-oss/docker-ecr-cache#v2.1.1:
176
+
- seek-oss/docker-ecr-cache#v2.2.0:
156
177
target: build-deps
157
178
- docker#v3.12.0
158
179
```
@@ -167,7 +188,7 @@ The `context` property can be used to specify a different path.
0 commit comments