Merge pull request #21 from twentyhq/charles-bochet-hasura-ci-setup

Add CircleCI workflow to deploy CI to canary and production
This commit is contained in:
Charles Bochet 2023-02-02 20:44:25 +01:00 committed by GitHub
commit d94ed13f4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

View File

@ -22,6 +22,18 @@ jobs:
- run:
command: cd front && npm run test
name: tests
deploy-api-canary:
docker:
- image: hasura/graphql-engine:latest.cli-migrations-v3
steps:
- checkout
- run: cd api && /bin/hasura-cli deploy --admin-secret $HASURA_ADMIN_SECRET --endpoint $HASURA_CANARY_ENDPOINT
deploy-api:
docker:
- image: hasura/graphql-engine:latest.cli-migrations-v3
steps:
- checkout
- run: cd api && /bin/hasura-cli deploy --admin-secret $HASURA_ADMIN_SECRET --endpoint $HASURA_ENDPOINT
workflows:
build-and-deploy-server:
@ -96,7 +108,22 @@ workflows:
--build-arg REACT_APP_AUTH0_AUDIENCE=$REACT_APP_AUTH0_AUDIENCE
--build-arg REACT_APP_API_URL=$REACT_APP_API_URL
build-and-deploy-api:
deploy-api:
jobs:
- deploy-api-canary
- slack/on-hold:
name: slack-notification
context: slack-secrets
requires:
- deploy-api-canary
- hold:
type: approval
requires:
- slack-notification
- deploy-api:
requires:
- hold
build-api:
when: << pipeline.parameters.build-api >>
jobs:
- aws-ecr/build-and-push-image: