Skip to content
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

chore(infra-gen2): Gen 2 infra #5026

Merged
merged 5 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: false
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: false
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: false
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: false
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: false
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