-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into client_Config_Version_1
- Loading branch information
Showing
7 changed files
with
4,073 additions
and
7,795 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@aws-amplify/backend-data': patch | ||
--- | ||
|
||
added provisionHotswapFriendlyResources and getDeploymentType to determine if we are in sandbox and would like to enable hotswap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: run_with_e2e_account | ||
description: Runs commands with e2e test account | ||
inputs: | ||
run: | ||
description: Script to run | ||
required: true | ||
shell: | ||
description: Shell | ||
required: false | ||
node_version: | ||
description: node version used to configure environment with | ||
required: false | ||
e2e_test_accounts: | ||
description: Serialized JSON array of strings with account numbers | ||
required: true | ||
aws_region: | ||
description: AWS region. If not provided random will be selected | ||
required: false | ||
link_cli: | ||
description: Whether should link Gen2 CLI globally | ||
default: false | ||
fresh_build: | ||
description: Whether should build from scratch | ||
default: false | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js | ||
uses: ./.github/actions/setup_node | ||
with: | ||
node-version: ${{ inputs.node_version }} | ||
- name: Restore Build Cache | ||
if: inputs.fresh_build != 'true' | ||
uses: ./.github/actions/restore_build_cache | ||
- name: Build With Cache | ||
if: inputs.fresh_build == 'true' | ||
uses: ./.github/actions/build_with_cache | ||
- name: Link CLI | ||
if: inputs.link_cli == 'true' | ||
shell: bash | ||
run: cd packages/cli && npm link | ||
- name: Select E2E test account | ||
uses: ./.github/actions/select_e2e_account | ||
id: selectE2EAccount | ||
with: | ||
e2e_test_accounts: ${{ inputs.e2e_test_accounts }} | ||
- name: Select region | ||
id: selectE2ERegion | ||
shell: bash | ||
run: | | ||
if [ -z "${{ inputs.aws_region }}" ]; then | ||
regions=("us-west-2" "us-east-1" "ca-central-1" "eu-central-1") | ||
rand=$[$RANDOM % ${#regions[@]}] | ||
selected_aws_region=${regions[$rand]} | ||
else | ||
selected_aws_region="${{ inputs.aws_region }}" | ||
fi | ||
echo "Selected AWS Region is $selected_aws_region" | ||
echo "selected_aws_region=$selected_aws_region" >> "$GITHUB_OUTPUT" | ||
- name: Configure test tooling credentials | ||
uses: ./.github/actions/setup_profile | ||
with: | ||
role-to-assume: ${{ steps.selectE2EAccount.outputs.e2e_test_tooling_role }} | ||
aws-region: ${{ steps.selectE2ERegion.outputs.selected_aws_region }} | ||
profile-name: e2e-tooling | ||
- name: Configure test execution credentials | ||
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # version 4.0.2 | ||
with: | ||
role-to-assume: ${{ steps.selectE2EAccount.outputs.e2e_execution_role }} | ||
aws-region: ${{ steps.selectE2ERegion.outputs.selected_aws_region }} | ||
- name: Run script | ||
shell: ${{ inputs.shell }} | ||
run: ${{ inputs.run }} | ||
env: | ||
AWS_REGION: ${{ steps.selectE2ERegion.outputs.selected_aws_region }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.