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: dev cb merge #12744

Merged
merged 23 commits into from
Jun 6, 2023
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f78fb68
fix: remove parameters when resource is deleted or unlinked (#12544)
jhockett May 19, 2023
a25ec17
feat: add status acm subcommand (#12190)
ykethan May 23, 2023
b01aa4b
chore(release): Merge main into dev (#12689)
sdstolworthy May 25, 2023
a0c4214
chore: update data packages (#12693)
alharris-at May 26, 2023
64984de
ci: Add codeowners for CI/CD files & folders (#12695)
awsluja May 26, 2023
eda51ff
chore: replace local impls for showApiAuthAcm and authNotifications w…
alharris-at May 26, 2023
5f291cf
test: fix migration tests (#12699)
edwardfoyle May 30, 2023
e45fcc1
fix: skip automatic form generation when datastore is not enabled
awinberg-aws May 31, 2023
9621788
chore: yarn modern (3.5.0) migration feature branch (#12579)
pavellazar Jun 1, 2023
65d11e9
chore: provide better mitigation steps for hosting error (#12715)
aws-eddy Jun 1, 2023
95ac090
Merge branch 'dev' into fix-studio-form-generation
awinberg-aws Jun 1, 2023
966da92
chore: resolve build errors with latest updates from dev branch
awinberg-aws Jun 1, 2023
0819db4
fix: throw message when adding lambda function with same name (#12623)
ykethan Jun 2, 2023
811e8fc
feat: display error message instead of object (#12636)
ykethan Jun 2, 2023
cb9b61e
Merge pull request #12713 from aws-amplify/fix-studio-form-generation
awinberg-aws Jun 2, 2023
5fe5cb2
chore: remove lint section from contributing.md (#12737)
sobolk Jun 5, 2023
99026e1
fix: lint warnings (#12738)
sobolk Jun 5, 2023
f2c18e4
Merge branch 'dev' into dev-cb-merge-jun-3
awsluja Jun 5, 2023
ea7e328
ci: fix lint error
awsluja Jun 5, 2023
58fc479
Merge remote-tracking branch 'upstream/cb' into dev-cb-merge-jun-3
awsluja Jun 5, 2023
ee219f2
ci: format
awsluja Jun 5, 2023
084984e
ci: fix publish
awsluja Jun 5, 2023
76087a3
ci: add integration test to generated workflow
awsluja Jun 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
105 changes: 28 additions & 77 deletions .circleci/config.base.yml
Original file line number Diff line number Diff line change
@@ -107,9 +107,8 @@ jobs:
executor: l_xlarge
steps:
- checkout
- run: yarn config set registry https://registry.npmjs.org
- run: yarn config set script-shell $(which bash)
- run: yarn run production-build
- run: yarn --immutable
- run: yarn production-build
- run:
name: Build tests
command: yarn build-tests
@@ -133,9 +132,7 @@ jobs:
executor: l_xlarge
steps:
- checkout
- run: yarn config set registry https://registry.npmjs.org
- run: yarn config set script-shell $(which bash)
- run: yarn install --network-concurrency 1
- run: yarn install --immutable
- run:
name: Build tests
command: yarn build-tests
@@ -152,8 +149,9 @@ jobs:
steps:
- install_node_windows
- checkout
- run: yarn config set script-shell $(which bash)
- run: yarn run production-build
- run: cd scripts && yarn && yarn ts-node remove-pkg-fetch-checksum.ts && cd -
- run: yarn --immutable
- run: yarn production-build
- run:
name: Build tests
command: yarn build-tests
@@ -243,7 +241,6 @@ jobs:
source .circleci/local_publish_helpers.sh
startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml"
setNpmRegistryUrlToLocal
changeNpmGlobalPath
checkPackageVersionsInLocalNpmRegistry

mock_e2e_tests:
@@ -342,7 +339,6 @@ jobs:
source .circleci/local_publish_helpers.sh
startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml"
setNpmRegistryUrlToLocal
changeNpmGlobalPath
generatePkgCli linux
unsetNpmRegistryUrl
- save_cache:
@@ -367,7 +363,6 @@ jobs:
source .circleci/local_publish_helpers.sh
startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml"
setNpmRegistryUrlToLocal
changeNpmGlobalPath
generatePkgCli macos
unsetNpmRegistryUrl
- save_cache:
@@ -392,7 +387,6 @@ jobs:
source .circleci/local_publish_helpers.sh
startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml"
setNpmRegistryUrlToLocal
changeNpmGlobalPath
generatePkgCli win
unsetNpmRegistryUrl
- save_cache:
@@ -537,14 +531,14 @@ jobs:
- store_artifacts:
path: ~/repo/packages/amplify-e2e-tests/amplify-e2e-reports

amplify_migration_tests_v5:
amplify_migration_tests_v8:
parameters:
os:
type: executor
default: l_large
executor: << parameters.os >>
environment:
AMPLIFY_PATH: /home/circleci/.npm-global/lib/node_modules/@aws-amplify/cli/bin/amplify
AMPLIFY_PATH: /home/circleci/.npm-global/bin/amplify
steps:
- restore_cache:
key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }}
@@ -553,42 +547,14 @@ jobs:
- restore_cache:
key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}
- run:
name: Run tests migrating from CLI v5.2.0
name: Run tests migrating from CLI v8.2.0
command: |
source .circleci/local_publish_helpers.sh
changeNpmGlobalPath
cd packages/amplify-migration-tests
retry yarn run migration_v5.2.0 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE
no_output_timeout: 65m
- run: *scan_e2e_test_artifacts
- store_test_results:
path: ~/repo/packages/amplify-migration-tests/
- store_artifacts:
path: ~/repo/packages/amplify-migration-tests/amplify-migration-reports
working_directory: ~/repo

amplify_migration_tests_v6:
parameters:
os:
type: executor
default: l_large
executor: << parameters.os >>
environment:
AMPLIFY_PATH: /home/circleci/.npm-global/lib/node_modules/@aws-amplify/cli/bin/amplify
steps:
- restore_cache:
key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }}
- restore_cache:
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- restore_cache:
key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}
- run:
name: Run tests migrating from CLI v6.1.0
command: |
source .circleci/local_publish_helpers.sh
changeNpmGlobalPath
cd packages/amplify-migration-tests
retry yarn run migration_v6.1.0 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE
unset IS_AMPLIFY_CI
echo $IS_AMPLIFY_CI
retry yarn migration_v8.2.0 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE
no_output_timeout: 65m
- run: *scan_e2e_test_artifacts
- store_test_results:
@@ -620,7 +586,7 @@ jobs:
cd packages/amplify-migration-tests
unset IS_AMPLIFY_CI
echo $IS_AMPLIFY_CI
retry yarn run migration_v10.5.1 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE
retry yarn migration_v10.5.1 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE
no_output_timeout: 65m
- run: *scan_e2e_test_artifacts
- store_test_results:
@@ -650,7 +616,7 @@ jobs:
source .circleci/local_publish_helpers.sh
changeNpmGlobalPath
cd packages/amplify-migration-tests
retry yarn run migration_v4.28.2_nonmultienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE
retry yarn migration_v4.28.2_nonmultienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE
no_output_timeout: 90m
- run: *scan_e2e_test_artifacts
- store_test_results:
@@ -680,7 +646,7 @@ jobs:
source .circleci/local_publish_helpers.sh
changeNpmGlobalPath
cd packages/amplify-migration-tests
retry yarn run migration_v4.52.0_multienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE
retry yarn migration_v4.52.0_multienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE
no_output_timeout: 90m
- run: *scan_e2e_test_artifacts
- store_test_results:
@@ -696,7 +662,7 @@ jobs:
default: l_large
executor: << parameters.os >>
environment:
AMPLIFY_PATH: /home/circleci/.npm-global/lib/node_modules/@aws-amplify/cli/bin/amplify
AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64
steps:
- restore_cache:
key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }}
@@ -708,9 +674,8 @@ jobs:
name: Run tests using general profile
command: |
source .circleci/local_publish_helpers.sh
changeNpmGlobalPath
cd packages/amplify-e2e-tests
retry yarn run general-config-e2e --no-cache --maxWorkers=3 --forceExit $TEST_SUITE
retry yarn general-config-e2e --no-cache --maxWorkers=3 --forceExit $TEST_SUITE
no_output_timeout: 90m
- run: *scan_e2e_test_artifacts
- store_test_results:
@@ -738,7 +703,7 @@ jobs:
source .circleci/local_publish_helpers.sh
amplify -v
cd packages/amplify-console-integration-tests
retry yarn run console-integration --no-cache --maxWorkers=4
retry yarn console-integration --no-cache --maxWorkers=4
name: 'Run Amplify Console integration tests'
no_output_timeout: 90m
- run: *scan_e2e_test_artifacts
@@ -778,23 +743,24 @@ jobs:
name: Configure Amplify CLI
command: |
yarn rm-dev-link && yarn link-dev && yarn rm-aa-dev-link && yarn link-aa-dev
echo 'export PATH="$(yarn global bin):$PATH"' >> $BASH_ENV
echo 'export PATH="$(pwd)/.bin:$PATH"' >> $BASH_ENV
source $BASH_ENV
amplify-dev
- run:
name: Clone auth test package
command: |
cd ..
git clone $AUTH_CLONE_URL
cd aws-amplify-cypress-auth
yarn --cache-folder ~/.cache/yarn
yarn
yarn add [email protected] --save
- run: cd .circleci/ && chmod +x auth.sh
- run: cd .circleci/ && chmod +x amplify_init.sh
- run: cd .circleci/ && chmod +x amplify_init.exp
- run: expect .circleci/amplify_init.exp ../aws-amplify-cypress-auth
- run: expect .circleci/enable_auth.exp
- run: cd ../aws-amplify-cypress-auth
- run: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
- run: yarn --immutable
- run: cd ../aws-amplify-cypress-auth/src && cat $(find . -type f -name 'aws-exports*')
- run:
name: Start Auth test server in background
@@ -820,12 +786,12 @@ jobs:
cd ..
git clone $API_CLONE_URL
cd aws-amplify-cypress-api
yarn --cache-folder ~/.cache/yarn
yarn
- run: cd .circleci/ && chmod +x api.sh
- run: expect .circleci/amplify_init.exp ../aws-amplify-cypress-api
- run: expect .circleci/enable_api.exp
- run: cd ../aws-amplify-cypress-api
- run: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
- run: yarn --immutable
- run: cd ../aws-amplify-cypress-api/src && cat $(find . -type f -name 'aws-exports*')
- run:
name: Start API test server in background
@@ -1175,21 +1141,7 @@ workflows:
- /run-e2e\/.*/
requires:
- upload_pkg_binaries
- amplify_migration_tests_v6:
context:
- e2e-auth-credentials
- cleanup-resources
- e2e-test-context
filters:
branches:
only:
- dev
- /run-e2e-with-rc\/.*/
- /tagged-release\/.*/
- /run-e2e\/.*/
requires:
- upload_pkg_binaries
- amplify_migration_tests_v5:
- amplify_migration_tests_v8:
context:
- e2e-auth-credentials
- cleanup-resources
@@ -1315,8 +1267,7 @@ workflows:
- amplify_install_test
- amplify_console_integration_tests
- amplify_migration_tests_v10
- amplify_migration_tests_v6
- amplify_migration_tests_v5
- amplify_migration_tests_v8
- amplify_migration_tests_non_multi_env_layers
- amplify_migration_tests_multi_env_layers
- github_prerelease_install_sanity_check
@@ -1379,7 +1330,7 @@ commands:
command: |
cd out
ln -sf amplify-pkg-linux-x64 amplify
echo "export PATH=$AMPLIFY_DIR:$PATH" >> $BASH_ENV
echo "export PATH=$AMPLIFY_DIR:$PATH:/home/circleci/repo/node_modules/.bin/" >> $BASH_ENV
source $BASH_ENV
- run:
name: Confirm Amplify CLI is installed and available in PATH
@@ -1430,10 +1381,10 @@ commands:
name: Run E2e Tests
command: |
source .circleci/local_publish_helpers.sh
source $BASH_ENV
startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml"
setNpmRegistryUrlToLocal
changeNpmGlobalPath
source $BASH_ENV
amplify version
cd packages/amplify-e2e-tests
retry runE2eTest
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -67,7 +67,8 @@ jobs:
- restore_cache:
key: >-
amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run: yarn run production-build
- run: yarn --immutable
- run: yarn production-build
- save_cache:
key: >-
amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
@@ -167,7 +168,7 @@ jobs:
source .circleci/local_publish_helpers.sh
amplify -v
cd packages/amplify-console-integration-tests
retry yarn run console-integration --no-cache --maxWorkers=4
retry yarn console-integration --no-cache --maxWorkers=4
name: Run Amplify Console integration tests
no_output_timeout: 90m
- run:
14 changes: 7 additions & 7 deletions .circleci/local_publish_helpers.sh
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ function generatePkgCli {

# install package depedencies
cp ../yarn.lock ./
yarn --production
yarn workspaces focus --production

# Optimize package size
find . \
@@ -143,13 +143,13 @@ function verifyPkgCli {
function unsetNpmRegistryUrl {
# Restore the original NPM and Yarn registry URLs
npm set registry "https://registry.npmjs.org/"
yarn config set registry "https://registry.npmjs.org/"
yarn config set npmRegistryServer "https://registry.npmjs.org/"
}

function unsetSudoNpmRegistryUrl {
# Restore the original NPM and Yarn registry URLs
sudo npm set registry "https://registry.npmjs.org/"
sudo yarn config set registry "https://registry.npmjs.org/"
sudo yarn config set npmRegistryServer "https://registry.npmjs.org/"
}

function changeNpmGlobalPath {
@@ -167,13 +167,13 @@ function changeSudoNpmGlobalPath {
function setNpmRegistryUrlToLocal {
# Set registry to local registry
npm set registry "$custom_registry_url"
yarn config set registry "$custom_registry_url"
yarn config set npmRegistryServer "$custom_registry_url"
}

function setSudoNpmRegistryUrlToLocal {
# Set registry to local registry
sudo npm set registry "$custom_registry_url"
sudo yarn config set registry "$custom_registry_url"
sudo yarn config set npmRegistryServer "$custom_registry_url"
}

function useChildAccountCredentials {
@@ -275,9 +275,9 @@ function runE2eTest {
if [ -f $FAILED_TEST_REGEX_FILE ]; then
# read the content of failed tests
failedTests=$(<$FAILED_TEST_REGEX_FILE)
NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn run e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE -t "$failedTests"
NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE -t "$failedTests"
else
NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn run e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE
NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE
fi
}

5 changes: 5 additions & 0 deletions .circleci/publish-codebuild.sh
Original file line number Diff line number Diff line change
@@ -13,6 +13,11 @@ git fetch --tags https://github.com/aws-amplify/amplify-cli
function lernaPublishExitOnFailure {
# exit on failure
set -e
if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then
# registy URL update changes .yarnrc.yml file
git update-index --assume-unchanged .yarnrc.yml
fi

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this over from the changes made to publish.sh

# run lerna publish with the args that were passed to this function
# duplicate stdout to a temp file
# grep the temp file for the lerna err token and return exit 1 if found (-v option inverts grep exit code)
6 changes: 6 additions & 0 deletions .circleci/publish.sh
Original file line number Diff line number Diff line change
@@ -9,6 +9,12 @@ function lernaPublishExitOnFailure {
# run lerna publish with the args that were passed to this function
# duplicate stdout to a temp file
# grep the temp file for the lerna err token and return exit 1 if found (-v option inverts grep exit code)

if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then
# registy URL update changes .yarnrc.yml file
git update-index --assume-unchanged .yarnrc.yml
fi

npx lerna publish "$@" | tee /tmp/publish-results && grep -qvz "lerna ERR!" < /tmp/publish-results
}

Loading