-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #898 from kuzzleio/4-dev
Release of the Admin Console v4
- Loading branch information
Showing
272 changed files
with
39,795 additions
and
27,670 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Deploy to AWS S3 | ||
description: Build admin console, upload it to S3 and invalidate Cloudfront cache | ||
|
||
inputs: | ||
AWS_ACCESS_KEY_ID: | ||
description: AWS Access key ID | ||
required: true | ||
AWS_SECRET_ACCESS_KEY: | ||
description: AWS secret key | ||
required: true | ||
S3_BUCKET: | ||
description: S3 bucket name | ||
required: true | ||
CLOUDFRONT_ID: | ||
description: Cloudfront distribution ID | ||
required: true | ||
REGION: | ||
description: AWS default region | ||
required: true | ||
default: 'us-west-2' | ||
GA_ID: | ||
description: Google Analytics ID | ||
required: true | ||
TARGET_DIST: | ||
description: Build artifact folder to deploy | ||
required: true | ||
default: dist | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install AWS CLI | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install python python-pip | ||
pip install awscli --upgrade --user | ||
shell: bash | ||
- name: Build | ||
run: | | ||
npm ci | ||
npm run build | ||
env: | ||
NODE_ENV: production | ||
GA_ID: ${{ inputs.GA_ID }} | ||
shell: bash | ||
- name: Deploy | ||
run: | | ||
aws s3 rm s3://${{ inputs.S3_BUCKET }} --recursive --region ${{ inputs.REGION }} | ||
aws s3 sync ${{ inputs.TARGET_DIST }} s3://${{ inputs.S3_BUCKET }} | ||
aws cloudfront create-invalidation --distribution-id ${{ inputs.CLOUDFRONT_ID }} --paths "/*" | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ inputs.AWS_SECRET_ACCESS_KEY }} | ||
shell: bash |
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,22 @@ | ||
name: E2E Cypress tests | ||
description: E2E tests using Cypress and different Kuzzle setup | ||
|
||
inputs: | ||
backend_config: | ||
description: Kuzzle setup configuration (1 or 2 or multi) | ||
required: true | ||
CYPRESS_RECORD_KEY: | ||
description: Kuzzle setup configuration (1 or 2 or multi) | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- run: npm ci --silent | ||
shell: bash | ||
- run: cd test/e2e/run-test && npm ci && cd - | ||
shell: bash | ||
- run: npm run test:e2e -- --backend=${{ inputs.backend_config}} | ||
env: | ||
CYPRESS_RECORD_KEY: ${{ inputs.CYPRESS_RECORD_KEY }} | ||
shell: bash |
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,9 @@ | ||
name: Lint | ||
description: Run ESLint | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: npm ci | ||
shell: bash | ||
- run: npm run test:lint | ||
shell: bash |
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,59 @@ | ||
name: Pull request checks | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "10" | ||
- uses: ./.github/actions/lint | ||
|
||
e2e-tests: | ||
name: E2E Cypress tests - Kuzzle ${{ matrix.backend_config}} | ||
needs: ['lint'] | ||
strategy: | ||
matrix: | ||
backend_config: ['1', '2', 'multi'] | ||
fail-fast: false | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10 | ||
- uses: ./.github/actions/e2e-tests | ||
with: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
backend_config: ${{ matrix.backend_config }} | ||
|
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,92 @@ | ||
name: Dev branches push checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- 4-dev | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "10" | ||
- uses: ./.github/actions/lint | ||
|
||
e2e-tests: | ||
name: E2E Cypress tests - Kuzzle ${{ matrix.backend_config}} | ||
needs: ['lint'] | ||
strategy: | ||
matrix: | ||
backend_config: ['1', '2', 'multi'] | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10 | ||
- uses: ./.github/actions/e2e-tests | ||
with: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
backend_config: ${{ matrix.backend_config }} | ||
|
||
deploy-staging: | ||
name: Deploy Admin Console to staging - next-console.kuzzle.io | ||
needs: ['e2e-tests'] | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- uses: ./.github/actions/deploy-to-s3 | ||
with: | ||
REGION: us-west-2 | ||
S3_BUCKET: next.console.kuzzle.io | ||
CLOUDFRONT_ID: E35G0B414M3IWU | ||
GA_ID: G-4EDTRNC8S9 | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
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,92 @@ | ||
name: Main branches push checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "10" | ||
- uses: ./.github/actions/lint | ||
|
||
e2e-tests: | ||
name: E2E Cypress tests - Kuzzle ${{ matrix.backend_config}} | ||
needs: ['lint'] | ||
strategy: | ||
matrix: | ||
backend_config: ['1', '2', 'multi'] | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10 | ||
- uses: ./.github/actions/e2e-tests | ||
with: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
backend_config: ${{ matrix.backend_config }} | ||
|
||
deploy-production: | ||
name: Deploy Admin Console to production - console.kuzzle.io | ||
needs: ['e2e-tests'] | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- uses: ./.github/actions/deploy-to-s3 | ||
with: | ||
REGION: us-west-2 | ||
S3_BUCKET: console.kuzzle.io | ||
CLOUDFRONT_ID: E2GPBJ9T0QR37G | ||
GA_ID: G-4EDTRNC8S9 | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
Oops, something went wrong.