Skip to content

Commit

Permalink
Merge branch 'master' of github.com:aws-amplify/amplify-cli into win-e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpc committed Sep 28, 2021
2 parents f8e7c30 + 7f04962 commit 39aa98e
Show file tree
Hide file tree
Showing 114 changed files with 1,128 additions and 744 deletions.
79 changes: 19 additions & 60 deletions .circleci/config.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ executors:
AMPLIFY_DIR: C:/home/circleci/repo/out
AMPLIFY_PATH: C:/home/circleci/repo/out/amplify.exe

build_img: &build-executor
docker:
- image: circleci/node:12
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_ACCESS_TOKEN
working_directory: ~/repo
resource_class: large

linux: &linux-e2e-executor
docker:
- image: public.ecr.aws/a6e6w2n0/amplify-cli-e2e-base-image-repo-public:latest
Expand All @@ -34,15 +25,6 @@ executors:
AMPLIFY_DIR: /home/circleci/repo/out
AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux

node12: &node12
working_directory: ~/repo
docker:
- image: circleci/node:12
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_ACCESS_TOKEN
resource_class: large

defaults: &defaults
working_directory: ~/repo
parameters:
Expand Down Expand Up @@ -100,7 +82,7 @@ jobs:
parameters:
os:
type: executor
default: build_img
default: linux
executor: << parameters.os >>
steps:
- checkout
Expand All @@ -121,7 +103,7 @@ jobs:
root: .
paths: .
test:
<<: *node12
<<: *linux-e2e-executor
steps:
- attach_workspace:
at: ./
Expand All @@ -141,7 +123,7 @@ jobs:
command: yarn coverage

mock_e2e_tests:
<<: *node12
<<: *linux-e2e-executor
steps:
- attach_workspace:
at: ./
Expand All @@ -160,7 +142,7 @@ jobs:
path: packages/amplify-util-mock/

publish_to_local_registry:
<<: *node12
<<: *linux-e2e-executor
steps:
- attach_workspace:
at: ./
Expand Down Expand Up @@ -200,7 +182,7 @@ jobs:
- ~/repo/.amplify-pkg-version

build_pkg_binaries:
<<: *node12
<<: *linux-e2e-executor
steps:
- attach_workspace:
at: ./
Expand Down Expand Up @@ -280,20 +262,20 @@ jobs:
path: ~/repo/packages/amplify-e2e-tests/amplify-e2e-reports

done_with_node_e2e_tests:
<<: *node12
<<: *linux-e2e-executor
steps:
- run: echo 'Done with Node CLI E2E Tests'

done_with_pkg_e2e_tests:
<<: *node12
<<: *linux-e2e-executor
steps:
- run: echo 'Done with pkg CLI E2E Tests'

amplify_e2e_tests_pkg:
parameters:
os:
type: executor
default: os.build_img
default: os.linux
executor: << parameters.os >>
working_directory: ~/repo
steps:
Expand Down Expand Up @@ -584,7 +566,7 @@ jobs:
path: /root/aws-amplify-cypress-api/cypress/screenshots

deploy:
<<: *node12
<<: *linux-e2e-executor
steps:
- attach_workspace:
at: ./
Expand All @@ -600,7 +582,7 @@ jobs:
bash ./.circleci/publish.sh
- run: *scan_e2e_test_artifacts
github_prerelease:
<<: *node12
<<: *linux-e2e-executor
steps:
- attach_workspace:
at: ./
Expand All @@ -624,7 +606,7 @@ jobs:
yarn ts-node scripts/github-prerelease.ts $version
github_prerelease_install_sanity_check:
<<: *node12
<<: *linux-e2e-executor
steps:
- restore_cache:
key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }}
Expand All @@ -639,7 +621,7 @@ jobs:
command: |
amplify version
github_release:
<<: *node12
<<: *linux-e2e-executor
steps:
- attach_workspace:
at: ./
Expand All @@ -653,7 +635,7 @@ jobs:
version=$(cat .amplify-pkg-version)
yarn ts-node scripts/github-release.ts $version
cleanup_resources:
<<: *node12
<<: *linux-e2e-executor
steps:
- attach_workspace:
at: ./
Expand All @@ -671,7 +653,7 @@ jobs:
working_directory: ~/repo

cleanup_resources_after_e2e_runs:
<<: *node12
<<: *linux-e2e-executor
steps:
- attach_workspace:
at: ./
Expand Down Expand Up @@ -737,7 +719,6 @@ workflows:
os:
- linux
- windows
- build_img
- test:
requires:
- build
Expand All @@ -752,7 +733,6 @@ workflows:
branches:
only:
- master
- win-e2e
- /tagged-release\/.*/
- /run-e2e\/*./
requires:
Expand All @@ -766,7 +746,6 @@ workflows:
branches:
only:
- master
- win-e2e
- beta
- /tagged-release\/.*/
- /run-e2e\/*./
Expand All @@ -778,7 +757,6 @@ workflows:
branches:
only:
- master
- win-e2e
- beta
- release
- /tagged-release\/.*/
Expand All @@ -796,7 +774,6 @@ workflows:
branches:
only:
- master
- win-e2e
- /tagged-release\/.*/
- /run-e2e\/*./
- amplify_e2e_tests:
Expand All @@ -811,7 +788,6 @@ workflows:
branches:
only:
- master
- win-e2e
- /tagged-release\/.*/
- /run-e2e\/*./
requires:
Expand All @@ -829,7 +805,6 @@ workflows:
branches:
only:
- master
- win-e2e
- /tagged-release\/.*/
- /run-e2e\/*./
requires:
Expand All @@ -847,7 +822,6 @@ workflows:
branches:
only:
- master
- win-e2e
- /tagged-release\/.*/
- /run-e2e\/*./
requires:
Expand All @@ -863,7 +837,6 @@ workflows:
branches:
only:
- master
- win-e2e
- /tagged-release\/.*/
- /run-e2e\/*./
requires:
Expand All @@ -879,7 +852,6 @@ workflows:
branches:
only:
- master
- win-e2e
- /tagged-release\/.*/
- /run-e2e\/*./
requires:
Expand All @@ -895,7 +867,6 @@ workflows:
branches:
only:
- master
- win-e2e
- /tagged-release\/.*/
- /run-e2e\/*./
requires:
Expand All @@ -911,7 +882,6 @@ workflows:
branches:
only:
- master
- win-e2e
- /tagged-release\/.*/
- /run-e2e\/*./
requires:
Expand Down Expand Up @@ -982,7 +952,6 @@ workflows:
only:
- release
- master
- win-e2e
- beta
- /tagged-release\/.*/
- /tagged-release-without-e2e-tests\/.*/
Expand Down Expand Up @@ -1024,9 +993,7 @@ commands:

- when:
condition:
or:
- equal: [*linux-e2e-executor, << parameters.os >>]
- equal: [*build-executor, << parameters.os >>]
equal: [*linux-e2e-executor, << parameters.os >>]
steps:
- run:
name: Symlink Amplify packaged CLI
Expand Down Expand Up @@ -1064,9 +1031,7 @@ commands:
steps:
- when:
condition:
or:
- equal: [*linux-e2e-executor, << parameters.os >>]
- equal: [*build-executor, << parameters.os >>]
equal: [*linux-e2e-executor, << parameters.os >>]
steps:
- run:
name: Install Java
Expand Down Expand Up @@ -1098,9 +1063,7 @@ commands:
no_output_timeout: 90m
- when:
condition:
or:
- equal: [*linux-e2e-executor, << parameters.os >>]
- equal: [*build-executor, << parameters.os >>]
equal: [*linux-e2e-executor, << parameters.os >>]
steps:
- run:
name: Shuffle AWS Credentials
Expand Down Expand Up @@ -1141,9 +1104,7 @@ commands:

- when:
condition:
or:
- equal: [*linux-e2e-executor, << parameters.os >>]
- equal: [*build-executor, << parameters.os >>]
equal: [*linux-e2e-executor, << parameters.os >>]
steps:
- run:
name: Scan E2E artifacts
Expand Down Expand Up @@ -1176,9 +1137,7 @@ commands:

- when:
condition:
or:
- equal: [*linux-e2e-executor, << parameters.os >>]
- equal: [*build-executor, << parameters.os >>]
equal: [*linux-e2e-executor, << parameters.os >>]
steps:
- run:
name: Scan E2E artifacts
Expand Down
Loading

0 comments on commit 39aa98e

Please sign in to comment.