Skip to content

chore(infra): Infra Gen 2 Backbone #5016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4e7f792
feat(core): add AmplifyOutputs types based on the CLI Gen2 client con…
NikaHsn May 22, 2024
f6cc0a4
chore: map AmplifyConfig to AmplifyOutputs (#4935)
Jordan-Nelson May 30, 2024
bbf6e72
chore: support multiple graphql or rest APIs (#4982)
Jordan-Nelson Jun 5, 2024
978dc6b
poc: gen2 infra
Equartey Jun 11, 2024
4a8a537
Merge branch 'feat/config-gen2' into poc/gen2-infra
Equartey Jun 12, 2024
9e57209
Merge branch 'main' into feat/config-gen2
tyllark Jun 12, 2024
ce7385f
refactor: consolidated multiple environments into a single output fil…
Equartey Jun 13, 2024
1d9f469
chore: fix lint issue
Equartey Jun 13, 2024
faf0309
chore: added API backend
Equartey Jun 13, 2024
72cf57a
fix: lint issue
Equartey Jun 13, 2024
e2b068a
chore: update gen2 version and config mapping tests (#5010)
Jordan-Nelson Jun 13, 2024
dcf5056
chore: supporting missing auth config options (#5011)
Jordan-Nelson Jun 13, 2024
87cc878
chore: use npm workspaces
Equartey Jun 13, 2024
f9a119d
fix: lint issue
Equartey Jun 13, 2024
0cbd8d8
fix: enable gen2 backend pulls
Equartey Jun 13, 2024
aee9124
fix: script path
Equartey Jun 13, 2024
74afba2
chore: ci fixes
Equartey Jun 13, 2024
8904706
Merge branch 'feat/config-gen2' into poc/gen2-infra
Equartey Jun 13, 2024
e941d5b
chore: remove base script
Equartey Jun 13, 2024
f9cf2f1
fix: chmod=+x
Equartey Jun 13, 2024
3791079
fix: missing command
Equartey Jun 13, 2024
a4033e6
chore: Create and upload config to S3 bucket
Equartey Jun 14, 2024
a70e37f
chore: only create s3 bucket when it doesn't exist
Equartey Jun 14, 2024
15f0d9f
Merge branch 'feat/config-gen2' into poc/gen2-infra
Equartey Jun 14, 2024
e5caa1d
fix: action conditional
Equartey Jun 14, 2024
5ed7170
fix: composite action doesn't support conditional prop
Equartey Jun 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/composite_actions/fetch_backends/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ inputs:
secret-identifier:
required: true
description: ARN of secret from AWS Secrets Manger which is a JSON object of app IDs / s3 bucket ARNs
needs-gen2-config:
required: true
description: Whether the E2E workflow needs amplify_outputs from AWS

runs:
using: "composite"
Expand Down Expand Up @@ -44,6 +47,14 @@ runs:
shell: bash
run: dart pub global run aft exec --include=${{ inputs.scope }} -- tool/pull_test_backend.sh

- name: Pull Amplify Outputs
shell: bash
run: |
if [[ "${{inputs.needs-gen2-config}}" == true ]]; then
dart pub global run aft exec --include=${{ inputs.scope }} -- tool/pull_test_gen2_backend.sh ...
fi
exit 0

- name: Undo any codegen changes from amplify pull
shell: bash
run: dart pub global run aft exec --include=${{ inputs.scope }} -- [ -d "lib/models" ] && git checkout '**/lib/models/*' || exit 0
Expand Down
35 changes: 35 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,27 @@ updates:
- dependency-name: "*"
update-types:
- "version-update:semver-patch"
- package-ecosystem: "npm"
directory: "infra-gen2"
schedule:
interval: "weekly"
groups:
cdk:
patterns:
- "aws-amplify"
- "@aws-amplify/*"
- "aws-cdk"
- "aws-cdk-lib"
- "constructs"
aws-sdk-js:
patterns:
- "@aws-sdk/*"
- "@aws-crypto/*"
ignore:
# Ignore patch version bumps
- dependency-name: "*"
update-types:
- "version-update:semver-patch"
- package-ecosystem: "pub"
directory: "/"
schedule:
Expand Down Expand Up @@ -207,6 +228,20 @@ updates:
- dependency-name: "aws_common"
- dependency-name: "amplify_lints"
- dependency-name: "aws_signature_v4"
- package-ecosystem: "pub"
directory: "infra-gen2"
schedule:
interval: "daily"
ignore:
# Ignore patch version bumps
- dependency-name: "*"
update-types:
- "version-update:semver-patch"
# Ignore all repo packages
- dependency-name: "amplify_core"
- dependency-name: "aws_common"
- dependency-name: "amplify_lints"
- dependency-name: "aws_signature_v4"
- package-ecosystem: "pub"
directory: "packages/aft"
schedule:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/amplify_analytics_pinpoint_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ jobs:
package-name: amplify_analytics_pinpoint_example
working-directory: packages/analytics/amplify_analytics_pinpoint/example
needs-aws-config: true
needs-gen2-config: false
e2e_ios_test:
needs: [test]
uses: ./.github/workflows/e2e_ios.yaml
Expand All @@ -174,6 +175,7 @@ jobs:
package-name: amplify_analytics_pinpoint_example
working-directory: packages/analytics/amplify_analytics_pinpoint/example
needs-aws-config: true
needs-gen2-config: false
e2e_web_test:
needs: [test]
uses: ./.github/workflows/e2e_web.yaml
Expand All @@ -182,6 +184,7 @@ jobs:
package-name: amplify_analytics_pinpoint_example
working-directory: packages/analytics/amplify_analytics_pinpoint/example
needs-aws-config: true
needs-gen2-config: false
e2e_linux_test:
needs: [test]
uses: ./.github/workflows/e2e_linux.yaml
Expand All @@ -190,6 +193,7 @@ jobs:
package-name: amplify_analytics_pinpoint_example
working-directory: packages/analytics/amplify_analytics_pinpoint/example
needs-aws-config: true
needs-gen2-config: false
e2e_windows_test:
needs: [test]
uses: ./.github/workflows/e2e_windows.yaml
Expand All @@ -198,3 +202,4 @@ jobs:
package-name: amplify_analytics_pinpoint_example
working-directory: packages/analytics/amplify_analytics_pinpoint/example
needs-aws-config: true
needs-gen2-config: false
5 changes: 5 additions & 0 deletions .github/workflows/amplify_api_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ jobs:
package-name: amplify_api_example
working-directory: packages/api/amplify_api/example
needs-aws-config: true
needs-gen2-config: true
e2e_ios_test:
needs: [test]
uses: ./.github/workflows/e2e_ios.yaml
Expand All @@ -178,6 +179,7 @@ jobs:
package-name: amplify_api_example
working-directory: packages/api/amplify_api/example
needs-aws-config: true
needs-gen2-config: true
e2e_web_test:
needs: [test]
uses: ./.github/workflows/e2e_web.yaml
Expand All @@ -186,6 +188,7 @@ jobs:
package-name: amplify_api_example
working-directory: packages/api/amplify_api/example
needs-aws-config: true
needs-gen2-config: true
e2e_linux_test:
needs: [test]
uses: ./.github/workflows/e2e_linux.yaml
Expand All @@ -194,6 +197,7 @@ jobs:
package-name: amplify_api_example
working-directory: packages/api/amplify_api/example
needs-aws-config: true
needs-gen2-config: true
e2e_windows_test:
needs: [test]
uses: ./.github/workflows/e2e_windows.yaml
Expand All @@ -202,3 +206,4 @@ jobs:
package-name: amplify_api_example
working-directory: packages/api/amplify_api/example
needs-aws-config: true
needs-gen2-config: true
5 changes: 5 additions & 0 deletions .github/workflows/amplify_auth_cognito_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ jobs:
package-name: amplify_auth_cognito_example
working-directory: packages/auth/amplify_auth_cognito/example
needs-aws-config: true
needs-gen2-config: false
e2e_ios_test:
needs: [test]
uses: ./.github/workflows/e2e_ios.yaml
Expand All @@ -186,6 +187,7 @@ jobs:
package-name: amplify_auth_cognito_example
working-directory: packages/auth/amplify_auth_cognito/example
needs-aws-config: true
needs-gen2-config: false
e2e_web_test:
needs: [test]
uses: ./.github/workflows/e2e_web.yaml
Expand All @@ -194,6 +196,7 @@ jobs:
package-name: amplify_auth_cognito_example
working-directory: packages/auth/amplify_auth_cognito/example
needs-aws-config: true
needs-gen2-config: false
e2e_linux_test:
needs: [test]
uses: ./.github/workflows/e2e_linux.yaml
Expand All @@ -202,6 +205,7 @@ jobs:
package-name: amplify_auth_cognito_example
working-directory: packages/auth/amplify_auth_cognito/example
needs-aws-config: true
needs-gen2-config: false
e2e_windows_test:
needs: [test]
uses: ./.github/workflows/e2e_windows.yaml
Expand All @@ -210,3 +214,4 @@ jobs:
package-name: amplify_auth_cognito_example
working-directory: packages/auth/amplify_auth_cognito/example
needs-aws-config: true
needs-gen2-config: false
5 changes: 5 additions & 0 deletions .github/workflows/amplify_authenticator_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ jobs:
package-name: amplify_authenticator_example
working-directory: packages/authenticator/amplify_authenticator/example
needs-aws-config: true
needs-gen2-config: false
e2e_ios_test:
needs: [test]
uses: ./.github/workflows/e2e_ios.yaml
Expand All @@ -178,6 +179,7 @@ jobs:
package-name: amplify_authenticator_example
working-directory: packages/authenticator/amplify_authenticator/example
needs-aws-config: true
needs-gen2-config: false
e2e_web_test:
needs: [test]
uses: ./.github/workflows/e2e_web.yaml
Expand All @@ -186,6 +188,7 @@ jobs:
package-name: amplify_authenticator_example
working-directory: packages/authenticator/amplify_authenticator/example
needs-aws-config: true
needs-gen2-config: false
e2e_linux_test:
needs: [test]
uses: ./.github/workflows/e2e_linux.yaml
Expand All @@ -194,6 +197,7 @@ jobs:
package-name: amplify_authenticator_example
working-directory: packages/authenticator/amplify_authenticator/example
needs-aws-config: true
needs-gen2-config: false
e2e_windows_test:
needs: [test]
uses: ./.github/workflows/e2e_windows.yaml
Expand All @@ -202,3 +206,4 @@ jobs:
package-name: amplify_authenticator_example
working-directory: packages/authenticator/amplify_authenticator/example
needs-aws-config: true
needs-gen2-config: false
2 changes: 2 additions & 0 deletions .github/workflows/amplify_datastore_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ jobs:
package-name: amplify_datastore_example
working-directory: packages/amplify_datastore/example
needs-aws-config: true
needs-gen2-config: false
e2e_ios_test:
needs: [test]
uses: ./.github/workflows/e2e_ios.yaml
Expand All @@ -152,3 +153,4 @@ jobs:
package-name: amplify_datastore_example
working-directory: packages/amplify_datastore/example
needs-aws-config: true
needs-gen2-config: false
5 changes: 5 additions & 0 deletions .github/workflows/amplify_db_common_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
package-name: amplify_db_common_example
working-directory: packages/common/amplify_db_common/example
needs-aws-config: true
needs-gen2-config: false
e2e_ios_test:
needs: [test]
uses: ./.github/workflows/e2e_ios.yaml
Expand All @@ -106,6 +107,7 @@ jobs:
package-name: amplify_db_common_example
working-directory: packages/common/amplify_db_common/example
needs-aws-config: true
needs-gen2-config: false
e2e_web_test:
needs: [test]
uses: ./.github/workflows/e2e_web.yaml
Expand All @@ -114,6 +116,7 @@ jobs:
package-name: amplify_db_common_example
working-directory: packages/common/amplify_db_common/example
needs-aws-config: true
needs-gen2-config: false
e2e_linux_test:
needs: [test]
uses: ./.github/workflows/e2e_linux.yaml
Expand All @@ -122,6 +125,7 @@ jobs:
package-name: amplify_db_common_example
working-directory: packages/common/amplify_db_common/example
needs-aws-config: true
needs-gen2-config: false
e2e_windows_test:
needs: [test]
uses: ./.github/workflows/e2e_windows.yaml
Expand All @@ -130,3 +134,4 @@ jobs:
package-name: amplify_db_common_example
working-directory: packages/common/amplify_db_common/example
needs-aws-config: true
needs-gen2-config: false
5 changes: 5 additions & 0 deletions .github/workflows/amplify_secure_storage_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
package-name: amplify_secure_storage_example
working-directory: packages/secure_storage/amplify_secure_storage/example
needs-aws-config: false
needs-gen2-config: false
e2e_ios_test:
needs: [test]
uses: ./.github/workflows/e2e_ios.yaml
Expand All @@ -102,6 +103,7 @@ jobs:
package-name: amplify_secure_storage_example
working-directory: packages/secure_storage/amplify_secure_storage/example
needs-aws-config: false
needs-gen2-config: false
e2e_web_test:
needs: [test]
uses: ./.github/workflows/e2e_web.yaml
Expand All @@ -110,6 +112,7 @@ jobs:
package-name: amplify_secure_storage_example
working-directory: packages/secure_storage/amplify_secure_storage/example
needs-aws-config: false
needs-gen2-config: false
e2e_linux_test:
needs: [test]
uses: ./.github/workflows/e2e_linux.yaml
Expand All @@ -118,6 +121,7 @@ jobs:
package-name: amplify_secure_storage_example
working-directory: packages/secure_storage/amplify_secure_storage/example
needs-aws-config: false
needs-gen2-config: false
e2e_windows_test:
needs: [test]
uses: ./.github/workflows/e2e_windows.yaml
Expand All @@ -126,3 +130,4 @@ jobs:
package-name: amplify_secure_storage_example
working-directory: packages/secure_storage/amplify_secure_storage/example
needs-aws-config: false
needs-gen2-config: false
5 changes: 5 additions & 0 deletions .github/workflows/amplify_storage_s3_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ jobs:
package-name: amplify_storage_s3_example
working-directory: packages/storage/amplify_storage_s3/example
needs-aws-config: true
needs-gen2-config: false
e2e_ios_test:
needs: [test]
uses: ./.github/workflows/e2e_ios.yaml
Expand All @@ -178,6 +179,7 @@ jobs:
package-name: amplify_storage_s3_example
working-directory: packages/storage/amplify_storage_s3/example
needs-aws-config: true
needs-gen2-config: false
e2e_web_test:
needs: [test]
uses: ./.github/workflows/e2e_web.yaml
Expand All @@ -186,6 +188,7 @@ jobs:
package-name: amplify_storage_s3_example
working-directory: packages/storage/amplify_storage_s3/example
needs-aws-config: true
needs-gen2-config: false
e2e_linux_test:
needs: [test]
uses: ./.github/workflows/e2e_linux.yaml
Expand All @@ -194,6 +197,7 @@ jobs:
package-name: amplify_storage_s3_example
working-directory: packages/storage/amplify_storage_s3/example
needs-aws-config: true
needs-gen2-config: false
e2e_windows_test:
needs: [test]
uses: ./.github/workflows/e2e_windows.yaml
Expand All @@ -202,3 +206,4 @@ jobs:
package-name: amplify_storage_s3_example
working-directory: packages/storage/amplify_storage_s3/example
needs-aws-config: true
needs-gen2-config: false
5 changes: 5 additions & 0 deletions .github/workflows/e2e_android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
description: Whether the E2E workflow needs configuration pulled from AWS
required: true
type: boolean
needs-gen2-config:
required: true
description: Whether the E2E workflow needs amplify_outputs from AWS
type: boolean

jobs:
e2e-test-android:
Expand Down Expand Up @@ -62,6 +66,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
scope: ${{ inputs.package-name }}
secret-identifier: ${{ secrets.AWS_SECRET_IDENTIFIER }}
needs-gen2-config: ${{ inputs.needs-gen2-config }}

- name: Launch Android emulator
uses: ./.github/composite_actions/launch_android_emulator
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/e2e_ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
description: Whether the E2E workflow needs configuration pulled from AWS
required: true
type: boolean
needs-gen2-config:
required: true
description: Whether the E2E workflow needs amplify_outputs from AWS
type: boolean

jobs:
e2e-test-ios:
Expand Down Expand Up @@ -60,6 +64,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
scope: ${{ inputs.package-name }}
secret-identifier: ${{ secrets.AWS_SECRET_IDENTIFIER }}
needs-gen2-config: ${{ inputs.needs-gen2-config }}

- name: Run integration tests
timeout-minutes: 60
Expand Down
Loading
Loading