Skip to content

Commit 400aaac

Browse files
authored
Merge pull request #770 from aws-amplify/main
chore: Release Codegen Plugin
2 parents f84e1c6 + c9284bd commit 400aaac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+24474
-1809
lines changed

.codebuild/e2e_workflow.yml

Lines changed: 138 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ batch:
3636
compute-type: BUILD_GENERAL1_MEDIUM
3737
depend-on:
3838
- build_linux
39+
- identifier: verify_dependency_licenses_extract
40+
buildspec: .codebuild/verify_dependency_licenses_extract.yml
41+
env:
42+
compute-type: BUILD_GENERAL1_MEDIUM
43+
depend-on:
44+
- build_linux
3945
- identifier: publish_to_local_registry
4046
buildspec: .codebuild/publish_to_local_registry.yml
4147
env:
@@ -62,8 +68,18 @@ batch:
6268
debug-session: true
6369
depend-on:
6470
- publish_to_local_registry
71+
- identifier: codegen_matrix
72+
buildspec: .codebuild/run_e2e_tests.yml
73+
env:
74+
compute-type: BUILD_GENERAL1_LARGE
75+
variables:
76+
TEST_SUITE: src/__tests__/codegen-matrix.test.ts
77+
CLI_REGION: ap-southeast-2
78+
debug-session: true
79+
depend-on:
80+
- publish_to_local_registry
6581
- identifier: >-
66-
add_codegen_ios_configure_codegen_android_configure_codegen_js_graphql_codegen_android
82+
l_add_codegen_ios_configure_codegen_android_configure_codegen_js_graphql_codegen_android
6783
buildspec: .codebuild/run_e2e_tests.yml
6884
env:
6985
compute-type: BUILD_GENERAL1_LARGE
@@ -74,7 +90,7 @@ batch:
7490
depend-on:
7591
- publish_to_local_registry
7692
- identifier: >-
77-
graphql_codegen_js_remove_codegen_android_remove_codegen_ios_add_codegen_android
93+
l_graphql_codegen_js_remove_codegen_android_remove_codegen_ios_add_codegen_android
7894
buildspec: .codebuild/run_e2e_tests.yml
7995
env:
8096
compute-type: BUILD_GENERAL1_LARGE
@@ -85,7 +101,7 @@ batch:
85101
depend-on:
86102
- publish_to_local_registry
87103
- identifier: >-
88-
configure_codegen_ios_datastore_modelgen_android_datastore_modelgen_js_feature_flags
104+
l_configure_codegen_ios_datastore_modelgen_android_datastore_modelgen_js_feature_flags
89105
buildspec: .codebuild/run_e2e_tests.yml
90106
env:
91107
compute-type: BUILD_GENERAL1_LARGE
@@ -96,7 +112,7 @@ batch:
96112
depend-on:
97113
- publish_to_local_registry
98114
- identifier: >-
99-
graphql_codegen_ios_add_codegen_js_datastore_modelgen_ios_remove_codegen_js
115+
l_graphql_codegen_ios_add_codegen_js_datastore_modelgen_ios_remove_codegen_js
100116
buildspec: .codebuild/run_e2e_tests.yml
101117
env:
102118
compute-type: BUILD_GENERAL1_LARGE
@@ -107,7 +123,7 @@ batch:
107123
depend-on:
108124
- publish_to_local_registry
109125
- identifier: >-
110-
datastore_modelgen_flutter_env_codegen_model_introspection_codegen_pull_codegen
126+
l_datastore_modelgen_flutter_env_codegen_model_introspection_codegen_pull_codegen
111127
buildspec: .codebuild/run_e2e_tests.yml
112128
env:
113129
compute-type: BUILD_GENERAL1_LARGE
@@ -118,7 +134,7 @@ batch:
118134
depend-on:
119135
- publish_to_local_registry
120136
- identifier: >-
121-
push_codegen_ios_push_codegen_android_graphql_documents_generator_push_codegen_js
137+
l_push_codegen_ios_push_codegen_android_graphql_documents_generator_push_codegen_js
122138
buildspec: .codebuild/run_e2e_tests.yml
123139
env:
124140
compute-type: BUILD_GENERAL1_LARGE
@@ -129,17 +145,18 @@ batch:
129145
depend-on:
130146
- publish_to_local_registry
131147
- identifier: >-
132-
build_app_ts_uninitialized_project_codegen_js_uninitialized_project_modelgen_android_uninitialized_project_modelgen_flutter
148+
l_build_app_ts_uninitialized_project_codegen_js_uninitialized_project_modelgen_android_uninitialized_project_modelgen_flutter
133149
buildspec: .codebuild/run_e2e_tests.yml
134150
env:
135151
compute-type: BUILD_GENERAL1_LARGE
136152
variables:
137153
TEST_SUITE: >-
138154
src/__tests__/build-app-ts.test.ts|src/__tests__/uninitialized-project-codegen-js.test.ts|src/__tests__/uninitialized-project-modelgen-android.test.ts|src/__tests__/uninitialized-project-modelgen-flutter.test.ts
139155
CLI_REGION: ap-southeast-1
156+
DISABLE_ESLINT_PLUGIN: true
140157
depend-on:
141158
- publish_to_local_registry
142-
- identifier: uninitialized_project_modelgen_ios_uninitialized_project_modelgen_js
159+
- identifier: l_uninitialized_project_modelgen_ios_uninitialized_project_modelgen_js
143160
buildspec: .codebuild/run_e2e_tests.yml
144161
env:
145162
compute-type: BUILD_GENERAL1_LARGE
@@ -149,10 +166,122 @@ batch:
149166
CLI_REGION: ap-southeast-2
150167
depend-on:
151168
- publish_to_local_registry
169+
- identifier: >-
170+
w_add_codegen_ios_configure_codegen_android_configure_codegen_js_graphql_codegen_android
171+
buildspec: .codebuild/run_e2e_tests_windows.yml
172+
env:
173+
compute-type: BUILD_GENERAL1_LARGE
174+
image: $WINDOWS_IMAGE_2019
175+
type: WINDOWS_SERVER_2019_CONTAINER
176+
variables:
177+
TEST_SUITE: >-
178+
src/__tests__/add-codegen-ios.test.ts|src/__tests__/configure-codegen-android.test.ts|src/__tests__/configure-codegen-js.test.ts|src/__tests__/graphql-codegen-android.test.ts
179+
CLI_REGION: us-east-1
180+
depend-on:
181+
- publish_to_local_registry
182+
- build_windows
183+
- identifier: >-
184+
w_graphql_codegen_js_remove_codegen_android_remove_codegen_ios_add_codegen_android
185+
buildspec: .codebuild/run_e2e_tests_windows.yml
186+
env:
187+
compute-type: BUILD_GENERAL1_LARGE
188+
image: $WINDOWS_IMAGE_2019
189+
type: WINDOWS_SERVER_2019_CONTAINER
190+
variables:
191+
TEST_SUITE: >-
192+
src/__tests__/graphql-codegen-js.test.ts|src/__tests__/remove-codegen-android.test.ts|src/__tests__/remove-codegen-ios.test.ts|src/__tests__/add-codegen-android.test.ts
193+
CLI_REGION: us-east-1
194+
depend-on:
195+
- publish_to_local_registry
196+
- build_windows
197+
- identifier: >-
198+
w_configure_codegen_ios_datastore_modelgen_android_datastore_modelgen_js_feature_flags
199+
buildspec: .codebuild/run_e2e_tests_windows.yml
200+
env:
201+
compute-type: BUILD_GENERAL1_LARGE
202+
image: $WINDOWS_IMAGE_2019
203+
type: WINDOWS_SERVER_2019_CONTAINER
204+
variables:
205+
TEST_SUITE: >-
206+
src/__tests__/configure-codegen-ios.test.ts|src/__tests__/datastore-modelgen-android.test.ts|src/__tests__/datastore-modelgen-js.test.ts|src/__tests__/feature-flags.test.ts
207+
CLI_REGION: us-east-1
208+
depend-on:
209+
- publish_to_local_registry
210+
- build_windows
211+
- identifier: >-
212+
w_graphql_codegen_ios_add_codegen_js_datastore_modelgen_ios_remove_codegen_js
213+
buildspec: .codebuild/run_e2e_tests_windows.yml
214+
env:
215+
compute-type: BUILD_GENERAL1_LARGE
216+
image: $WINDOWS_IMAGE_2019
217+
type: WINDOWS_SERVER_2019_CONTAINER
218+
variables:
219+
TEST_SUITE: >-
220+
src/__tests__/graphql-codegen-ios.test.ts|src/__tests__/add-codegen-js.test.ts|src/__tests__/datastore-modelgen-ios.test.ts|src/__tests__/remove-codegen-js.test.ts
221+
CLI_REGION: us-east-1
222+
depend-on:
223+
- publish_to_local_registry
224+
- build_windows
225+
- identifier: >-
226+
w_datastore_modelgen_flutter_env_codegen_model_introspection_codegen_pull_codegen
227+
buildspec: .codebuild/run_e2e_tests_windows.yml
228+
env:
229+
compute-type: BUILD_GENERAL1_LARGE
230+
image: $WINDOWS_IMAGE_2019
231+
type: WINDOWS_SERVER_2019_CONTAINER
232+
variables:
233+
TEST_SUITE: >-
234+
src/__tests__/datastore-modelgen-flutter.test.ts|src/__tests__/env-codegen.test.ts|src/__tests__/model-introspection-codegen.test.ts|src/__tests__/pull-codegen.test.ts
235+
CLI_REGION: us-east-1
236+
depend-on:
237+
- publish_to_local_registry
238+
- build_windows
239+
- identifier: >-
240+
w_push_codegen_ios_push_codegen_android_graphql_documents_generator_push_codegen_js
241+
buildspec: .codebuild/run_e2e_tests_windows.yml
242+
env:
243+
compute-type: BUILD_GENERAL1_LARGE
244+
image: $WINDOWS_IMAGE_2019
245+
type: WINDOWS_SERVER_2019_CONTAINER
246+
variables:
247+
TEST_SUITE: >-
248+
src/__tests__/push-codegen-ios.test.ts|src/__tests__/push-codegen-android.test.ts|src/__tests__/graphql-documents-generator.test.ts|src/__tests__/push-codegen-js.test.ts
249+
CLI_REGION: us-east-1
250+
depend-on:
251+
- publish_to_local_registry
252+
- build_windows
253+
- identifier: >-
254+
w_build_app_ts_uninitialized_project_codegen_js_uninitialized_project_modelgen_android_uninitialized_project_modelgen_flutter
255+
buildspec: .codebuild/run_e2e_tests_windows.yml
256+
env:
257+
compute-type: BUILD_GENERAL1_LARGE
258+
image: $WINDOWS_IMAGE_2019
259+
type: WINDOWS_SERVER_2019_CONTAINER
260+
variables:
261+
TEST_SUITE: >-
262+
src/__tests__/build-app-ts.test.ts|src/__tests__/uninitialized-project-codegen-js.test.ts|src/__tests__/uninitialized-project-modelgen-android.test.ts|src/__tests__/uninitialized-project-modelgen-flutter.test.ts
263+
CLI_REGION: us-east-1
264+
DISABLE_ESLINT_PLUGIN: true
265+
depend-on:
266+
- publish_to_local_registry
267+
- build_windows
268+
- identifier: w_uninitialized_project_modelgen_ios_uninitialized_project_modelgen_js
269+
buildspec: .codebuild/run_e2e_tests_windows.yml
270+
env:
271+
compute-type: BUILD_GENERAL1_LARGE
272+
image: $WINDOWS_IMAGE_2019
273+
type: WINDOWS_SERVER_2019_CONTAINER
274+
variables:
275+
TEST_SUITE: >-
276+
src/__tests__/uninitialized-project-modelgen-ios.test.ts|src/__tests__/uninitialized-project-modelgen-js.test.ts
277+
CLI_REGION: us-east-1
278+
depend-on:
279+
- publish_to_local_registry
280+
- build_windows
152281
- identifier: cleanup_e2e_resources
153282
buildspec: .codebuild/cleanup_e2e_resources.yml
154283
env:
155284
compute-type: BUILD_GENERAL1_MEDIUM
156285
depend-on:
157286
- >-
158-
add_codegen_ios_configure_codegen_android_configure_codegen_js_graphql_codegen_android
287+
l_add_codegen_ios_configure_codegen_android_configure_codegen_js_graphql_codegen_android

.codebuild/e2e_workflow_base.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ batch:
3636
compute-type: BUILD_GENERAL1_MEDIUM
3737
depend-on:
3838
- build_linux
39+
- identifier: verify_dependency_licenses_extract
40+
buildspec: .codebuild/verify_dependency_licenses_extract.yml
41+
env:
42+
compute-type: BUILD_GENERAL1_MEDIUM
43+
depend-on:
44+
- build_linux
3945
- identifier: publish_to_local_registry
4046
buildspec: .codebuild/publish_to_local_registry.yml
4147
env:
@@ -62,3 +68,13 @@ batch:
6268
debug-session: true
6369
depend-on:
6470
- publish_to_local_registry
71+
- identifier: codegen_matrix
72+
buildspec: .codebuild/run_e2e_tests.yml
73+
env:
74+
compute-type: BUILD_GENERAL1_LARGE
75+
variables:
76+
TEST_SUITE: src/__tests__/codegen-matrix.test.ts
77+
CLI_REGION: ap-southeast-2
78+
debug-session: true
79+
depend-on:
80+
- publish_to_local_registry

.codebuild/pr_workflow.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,9 @@ batch:
3434
buildspec: .codebuild/verify_api_extract.yml
3535
depend-on:
3636
- build_linux
37+
- identifier: verify_dependency_licenses_extract
38+
buildspec: .codebuild/verify_dependency_licenses_extract.yml
39+
env:
40+
compute-type: BUILD_GENERAL1_MEDIUM
41+
depend-on:
42+
- build_linux

.codebuild/release_workflow.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ batch:
3030
buildspec: .codebuild/verify_api_extract.yml
3131
depend-on:
3232
- build_linux
33+
- identifier: verify_dependency_licenses_extract
34+
buildspec: .codebuild/verify_dependency_licenses_extract.yml
35+
env:
36+
compute-type: BUILD_GENERAL1_MEDIUM
37+
depend-on:
38+
- build_linux
3339
- identifier: deploy
3440
buildspec: .codebuild/deploy.yml
3541
depend-on:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 0.2
2+
env:
3+
shell: powershell.exe
4+
variables:
5+
AMPLIFY_DIR: /root/.npm-global/lib/node_modules/@aws-amplify/cli-internal/bin
6+
AMPLIFY_PATH: /root/.npm-global/lib/node_modules/@aws-amplify/cli-internal/bin/amplify
7+
CI: true
8+
CODEBUILD: true
9+
NODE_OPTIONS: --max-old-space-size=8096
10+
SKIP_SET_NPM_PREFIX: true
11+
phases:
12+
build:
13+
commands:
14+
# commands need to be run in stand-alone bash scripts so that bash can be used on windows
15+
- bash ./.codebuild/scripts/e2e_test_windows.sh
16+
post_build:
17+
commands:
18+
# commands need to be run in stand-alone bash scripts so that bash can be used on windows
19+
- bash ./.codebuild/scripts/post_e2e_test.sh
20+
21+
artifacts:
22+
files:
23+
- '**/*'
24+
base-directory: $Env:CODEBUILD_SRC_DIR\packages\amplify-codegen-e2e-tests\amplify-e2e-reports
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# set exit on error to true
4+
set -e
5+
6+
source ./shared-scripts.sh && _setupE2ETestsWindows
7+
codebuild-breakpoint
8+
source ./shared-scripts.sh && _runE2ETestsWindows

.codebuild/scripts/local_publish_helpers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function startLocalRegistry {
77
# Start local registry
88
tmp_registry_log="$(mktemp)"
99
echo "Registry output file: $tmp_registry_log"
10-
(cd && nohup npx ${VERDACCIO_PACKAGE:-$default_verdaccio_package} -c $1 &>$tmp_registry_log &)
10+
nohup npx ${VERDACCIO_PACKAGE:-$default_verdaccio_package} -c $1 &>$tmp_registry_log &
1111
# Wait for Verdaccio to boot
1212
grep -q 'http address' <(tail -f $tmp_registry_log)
1313
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# set exit on error to true
4+
set -e
5+
6+
source ./shared-scripts.sh && _unassumeTestAccountCredentials
7+
aws sts get-caller-identity
8+
source ./shared-scripts.sh && _scanArtifacts

.codebuild/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ phases:
1010
artifacts:
1111
files:
1212
- 'shared-scripts.sh'
13+
reports:
14+
coverage-report:
15+
files:
16+
- 'packages/*/coverage/clover.xml'
17+
file-format: 'CLOVERXML'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 0.2
2+
env:
3+
shell: bash
4+
phases:
5+
build:
6+
commands:
7+
- source ./shared-scripts.sh && _verifyDependencyLicensesExtract

0 commit comments

Comments
 (0)