Skip to content

Commit 5ae5cd0

Browse files
authored
Merge pull request #558 from aws-amplify/main
Release fix - cache misses
2 parents b517590 + c074abb commit 5ae5cd0

File tree

2 files changed

+28
-40
lines changed

2 files changed

+28
-40
lines changed

.circleci/config.base.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ jobs:
8282
- run: yarn cache clean --force
8383
- run: yarn run production-build
8484
- save_cache:
85-
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}-<< parameters.os >>
85+
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
8686
paths:
8787
- ~/.cache
8888
- save_cache:
89-
key: amplify-codegen-ssh-deps-{{ .Branch }}-<< parameters.os >>
89+
key: amplify-codegen-ssh-deps-{{ .Branch }}
9090
paths:
9191
- ~/.ssh
9292
- persist_to_workspace:
@@ -116,7 +116,7 @@ jobs:
116116
- attach_workspace:
117117
at: ./
118118
- restore_cache:
119-
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}-l
119+
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
120120
- run:
121121
name: Lint
122122
command: yarn lint
@@ -135,8 +135,8 @@ jobs:
135135
at: ./
136136
- restore_cache:
137137
keys:
138-
- amplify-codegen-ssh-deps-{{ .Branch }}-l
139-
- amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}-l
138+
- amplify-codegen-ssh-deps-{{ .Branch }}
139+
- amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
140140
- run:
141141
name: Authenticate with npm
142142
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
@@ -152,7 +152,7 @@ jobs:
152152
- attach_workspace:
153153
at: ./
154154
- restore_cache:
155-
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}-<< parameters.os >>
155+
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
156156
- run:
157157
name: Publish to verdaccio
158158
command: |
@@ -165,7 +165,7 @@ jobs:
165165
yarn publish-to-verdaccio
166166
unsetNpmRegistryUrl
167167
- save_cache:
168-
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}-<< parameters.os >>
168+
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
169169
paths:
170170
- ~/verdaccio-cache/
171171

@@ -176,9 +176,9 @@ jobs:
176176
- attach_workspace:
177177
at: ./
178178
- restore_cache:
179-
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}-<< parameters.os >>
179+
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
180180
- restore_cache:
181-
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}-<< parameters.os >>
181+
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
182182
- run: *install_cli
183183
- run:
184184
name: Run e2e tests

.circleci/config.yml

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ orbs:
66
node: circleci/[email protected]
77
machine:
88
environment:
9-
PATH: '${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin'
9+
PATH: ${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin
1010
executors:
1111
w: &ref_1
1212
machine:
13-
image: 'windows-server-2019-vs2019:stable'
13+
image: windows-server-2019-vs2019:stable
1414
resource_class: windows.medium
1515
shell: bash.exe
1616
working_directory: ~/repo
1717
environment:
18-
AMPLIFY_DIR: 'C:/home/circleci/repo/out'
19-
AMPLIFY_PATH: 'C:/home/circleci/repo/out/amplify.exe'
18+
AMPLIFY_DIR: C:/home/circleci/repo/out
19+
AMPLIFY_PATH: C:/home/circleci/repo/out/amplify.exe
2020
l: &ref_2
2121
docker:
22-
- image: 'public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:latest'
22+
- image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:latest
2323
working_directory: ~/repo
2424
resource_class: large
2525
environment:
@@ -36,7 +36,7 @@ executors:
3636
AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64
3737
a:
3838
docker:
39-
- image: 'cimg/android:2022.09'
39+
- image: cimg/android:2022.09
4040
working_directory: ~/repo
4141
resource_class: large
4242
environment:
@@ -77,13 +77,11 @@ jobs:
7777
- run: yarn cache clean --force
7878
- run: yarn run production-build
7979
- save_cache:
80-
key: >-
81-
amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock"
82-
}}-<< parameters.os >>
80+
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
8381
paths:
8482
- ~/.cache
8583
- save_cache:
86-
key: 'amplify-codegen-ssh-deps-{{ .Branch }}-<< parameters.os >>'
84+
key: amplify-codegen-ssh-deps-{{ .Branch }}
8785
paths:
8886
- ~/.ssh
8987
- persist_to_workspace:
@@ -119,7 +117,7 @@ jobs:
119117
- restore_cache:
120118
key: >-
121119
amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum
122-
"yarn.lock" }}-l
120+
"yarn.lock" }}
123121
- run:
124122
name: Lint
125123
command: yarn lint
@@ -138,13 +136,11 @@ jobs:
138136
at: ./
139137
- restore_cache:
140138
keys:
141-
- 'amplify-codegen-ssh-deps-{{ .Branch }}-l'
142-
- >-
143-
amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock"
144-
}}-l
139+
- amplify-codegen-ssh-deps-{{ .Branch }}
140+
- amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
145141
- run:
146142
name: Authenticate with npm
147-
command: 'echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc'
143+
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
148144
- run:
149145
name: Publish Amplify Codegen
150146
command: |
@@ -157,9 +153,7 @@ jobs:
157153
- attach_workspace:
158154
at: ./
159155
- restore_cache:
160-
key: >-
161-
amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock"
162-
}}-<< parameters.os >>
156+
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
163157
- run:
164158
name: Publish to verdaccio
165159
command: |
@@ -172,9 +166,7 @@ jobs:
172166
yarn publish-to-verdaccio
173167
unsetNpmRegistryUrl
174168
- save_cache:
175-
key: >-
176-
amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}-<<
177-
parameters.os >>
169+
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
178170
paths:
179171
- ~/verdaccio-cache/
180172
e2e-test:
@@ -185,13 +177,9 @@ jobs:
185177
- attach_workspace:
186178
at: ./
187179
- restore_cache:
188-
key: >-
189-
amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock"
190-
}}-<< parameters.os >>
180+
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
191181
- restore_cache:
192-
key: >-
193-
amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}-<<
194-
parameters.os >>
182+
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
195183
- run: *ref_3
196184
- run:
197185
name: Run e2e tests
@@ -242,9 +230,9 @@ jobs:
242230
- attach_workspace:
243231
at: ./
244232
- restore_cache:
245-
key: 'amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
233+
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
246234
- restore_cache:
247-
key: 'amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}'
235+
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
248236
- node/install:
249237
install-yarn: true
250238
node-version: '16.13'
@@ -274,7 +262,7 @@ jobs:
274262
- attach_workspace:
275263
at: ./
276264
- restore_cache:
277-
key: 'amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
265+
key: amplify-codegen-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
278266
- run:
279267
name: Run cleanup script
280268
command: |

0 commit comments

Comments
 (0)