Skip to content

Commit

Permalink
chore: separate gen1 and gen2 environments pull
Browse files Browse the repository at this point in the history
  • Loading branch information
zchenwei committed May 23, 2024
1 parent d4ec7d6 commit d0d2fab
Show file tree
Hide file tree
Showing 333 changed files with 2,656 additions and 1,730 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build-and-runtime-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@ jobs:
no-lockfile: true
working-directory: ./canary/apps/${{ matrix.framework }}/${{ matrix.build-tool }}
- name: Add Amplify CLI
run: |
yarn global add @aws-amplify/cli && \
yarn add @aws-amplify/backend-cli@latest aws-cdk-lib constructs -D -W
# The Amplify Gen 2 CLI has been renamed to "ampx"
# Delete the legacy "amplify" alias which conflicts with Gen 1 command
- name: Delete the legacy amplify alias
run: rm -f ./node_modules/.bin/amplify
run: yarn global add @aws-amplify/cli
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 https://github.com/aws-actions/configure-aws-credentials/commit/e3dd6a429d7300a6a4c196c26e071d42e0343502
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/publish-hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ jobs:
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
- name: Add Amplify CLI
run: |
yarn global add @aws-amplify/cli && \
yarn add @aws-amplify/backend-cli@latest aws-cdk-lib constructs -D -W
# The Amplify Gen 2 CLI has been renamed to "ampx"
# Delete the legacy "amplify" alias which conflicts with Gen 1 command
- name: Delete the legacy amplify alias
run: rm -f ./node_modules/.bin/amplify
run: yarn global add @aws-amplify/cli
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 https://github.com/aws-actions/configure-aws-credentials/commit/e3dd6a429d7300a6a4c196c26e071d42e0343502
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/publish-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,7 @@ jobs:
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
- name: Add Amplify CLI
run: |
yarn global add @aws-amplify/cli && \
yarn add @aws-amplify/backend-cli@latest aws-cdk-lib constructs -D -W
# The Amplify Gen 2 CLI has been renamed to "ampx"
# Delete the legacy "amplify" alias which conflicts with Gen 1 command
- name: Delete the legacy amplify alias
run: rm -f ./node_modules/.bin/amplify
run: yarn global add @aws-amplify/cli
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 https://github.com/aws-actions/configure-aws-credentials/commit/e3dd6a429d7300a6a4c196c26e071d42e0343502
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,7 @@ jobs:
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
- name: Add Amplify CLI
run: |
yarn global add @aws-amplify/cli && \
yarn add @aws-amplify/backend-cli@latest aws-cdk-lib constructs -D -W
# The Amplify Gen 2 CLI has been renamed to "ampx"
# Delete the legacy alias "amplify" which conflicts with Gen 1 command
- name: Delete the legacy amplify alias
run: rm -f ./node_modules/.bin/amplify
run: yarn global add @aws-amplify/cli
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 https://github.com/aws-actions/configure-aws-credentials/commit/e3dd6a429d7300a6a4c196c26e071d42e0343502
with:
Expand Down
50 changes: 20 additions & 30 deletions .github/workflows/reusable-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,32 +67,32 @@ jobs:
include:
- example: angular
package: angular
tags: '@angular and not @todo-angular'
tags: '@gen1 and @angular and not @todo-angular'
version: gen1

- example: next
package: react
tags: '@react and not @todo-react'
tags: '@gen1 and @react and not @todo-react'
version: gen1

- example: vue
package: vue
tags: '@vue and not @todo-vue'
tags: '@gen1 and @vue and not @todo-vue'
version: gen1

- example: angular
- example: angular-gen2
package: angular
tags: '@angular and not @todo-angular'
tags: '@gen2 and @angular and not @todo-angular'
version: gen2

- example: next
- example: next-gen2
package: react
tags: '@react and not @todo-react'
tags: '@gen2 and @react and not @todo-react'
version: gen2

- example: vue
- example: vue-gen2
package: vue
tags: '@vue and not @todo-vue'
tags: '@gen2 and @vue and not @todo-vue'
version: gen2

steps:
Expand Down Expand Up @@ -241,7 +241,8 @@ jobs:
aws configure set aws_session_token $AWS_SESSION_TOKEN && \
aws configure set default.region $AWS_REGION
- name: Pull down Geo AWS environments
- name: Pull down Gen1 Geo AWS environments
if: ${{ matrix.version == 'gen1' }}
run: yarn environments geo pull

- name: Configure AWS Credentials
Expand Down Expand Up @@ -278,7 +279,8 @@ jobs:
aws configure set aws_session_token $AWS_SESSION_TOKEN && \
aws configure set default.region $AWS_REGION
- name: Pull down Datastore AWS environments
- name: Pull down Gen1 Datastore AWS environments
if: ${{ matrix.version == 'gen1' }}
run: yarn environments datastore pull

- name: Configure liveness credentials
Expand All @@ -294,7 +296,8 @@ jobs:
aws configure set aws_session_token $AWS_SESSION_TOKEN && \
aws configure set default.region $AWS_REGION
- name: Pull down Liveness AWS environments
- name: Pull down Gen1 Liveness AWS environments
if: ${{ matrix.version == 'gen1' }}
run: yarn environments liveness pull

- name: Configure in-app-messaging credentials
Expand All @@ -313,7 +316,8 @@ jobs:
aws configure set aws_session_token $AWS_SESSION_TOKEN && \
aws configure set default.region $AWS_REGION
- name: Pull down In-app-messaging AWS environments
- name: Pull down Gen1 In-app-messaging AWS environments
if: ${{ matrix.version == 'gen1' }}
run: yarn environments in-app-messaging pull

- name: Delete AWS profile
Expand All @@ -323,7 +327,7 @@ jobs:
run: yarn ${{ matrix.example }}-example build

- name: Start ${{ matrix.example }} example
run: yarn ${{ matrix.example }}-example start & npx wait-on -c waitOnConfig.json -t 20000 http-get://localhost:3000/ui/components/authenticator/sign-in-with-username
run: yarn ${{ matrix.example }}-example start & npx wait-on -c waitOnConfig.json -t 20000 http-get://localhost:3000/ui/components/authenticator/sign-in-with-email
env:
# Setting this value temporarily since the beta liveness sample app hits the gamma endpoint
NEXT_PUBLIC_STREAMING_API_URL: wss://streaming-rekognition-gamma.us-east-1.amazonaws.com
Expand Down Expand Up @@ -445,14 +449,7 @@ jobs:
yarn react-native-example ios:pod-install
- name: Add Amplify CLI
run: |
yarn global add @aws-amplify/cli && \
yarn add @aws-amplify/backend-cli@latest aws-cdk-lib constructs -D -W
# The Amplify Gen 2 CLI has been renamed to "ampx"
# Delete the legacy alias "amplify" which conflicts with Gen 1 command
- name: Delete the legacy amplify alias
run: rm -f ./node_modules/.bin/amplify
run: yarn global add @aws-amplify/cli

- name: Get CLI versions
id: cli-version
Expand Down Expand Up @@ -561,14 +558,7 @@ jobs:
run: yarn react-native build

- name: Add Amplify CLI
run: |
yarn global add @aws-amplify/cli && \
yarn add @aws-amplify/backend-cli@latest aws-cdk-lib constructs -D -W
# The Amplify Gen 2 CLI has been renamed to "ampx"
# Delete the legacy "amplify" alias which conflicts with Gen 1 command
- name: Delete the legacy amplify alias
run: rm -f ./node_modules/.bin/amplify
run: yarn global add @aws-amplify/cli

- name: Get CLI versions
id: cli-version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"name": "@aws-amplify/ui-auth-with-username-no-attributes-environment",
"version": "0.0.1",
"scripts": {
"pull": "amplify pull --appId d19uoxfo0qrigq --envName staging"
"pull": "amplify pull --appId d19uoxfo0qrigq --envName staging",
"generate": "echo 'Login with username is not supported by Gen2'"
}
}
2 changes: 1 addition & 1 deletion environments/datastore/action-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"version": "0.0.1",
"scripts": {
"pull": "amplify pull --appId d1c6vwjkmuz6ml --envName dev",
"generate": "Not available yet"
"generate": "echo 'Not available yet'"
}
}
2 changes: 1 addition & 1 deletion environments/geo/basic-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"version": "0.0.1",
"scripts": {
"pull": "amplify pull --appId d1xll51xlvl8ri --envName staging",
"generate": "Not available yet"
"generate": "echo 'Not available yet'"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"version": "0.0.1",
"scripts": {
"pull": "amplify pull --appId d1322eg7ntbei6 --envName staging",
"generate": "Not available yet"
"generate": "echo 'Not available yet'"
}
}
2 changes: 1 addition & 1 deletion environments/liveness/liveness-environment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"version": "0.0.1",
"scripts": {
"pull": "amplify pull --appId d2pnskzbmchcgk --envName dev",
"generate": "Not available yet"
"generate": "echo 'Not available yet'"
}
}
17 changes: 17 additions & 0 deletions examples/angular-gen2/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
16 changes: 16 additions & 0 deletions examples/angular-gen2/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
47 changes: 47 additions & 0 deletions examples/angular-gen2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
23 changes: 23 additions & 0 deletions examples/angular-gen2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Angular

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.

## Development server

Run `yarn dev` for a dev server. Navigate to `http://localhost:3000/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
Loading

0 comments on commit d0d2fab

Please sign in to comment.