Add .circleci/config.yml
This commit is contained in:
@@ -24,9 +24,9 @@ jobs:
|
||||
docker:
|
||||
- image: cimg/node:16.15.0
|
||||
parameters:
|
||||
HASURA_PROD_SECRET:
|
||||
secret:
|
||||
type: string
|
||||
default: ${HASURA_PROD_SECRET}
|
||||
default: $HASURA_PROD_SECRET
|
||||
working_directory: ~/repo/hasura
|
||||
steps:
|
||||
- checkout:
|
||||
@@ -35,9 +35,9 @@ jobs:
|
||||
name: Execute migration
|
||||
command: |
|
||||
npm install hasura-cli -g
|
||||
hasura migrate apply --endpoint https://db.imex.online/ --admin-secret << HASURA_PROD_SECRET >>
|
||||
hasura metadata apply --endpoint https://db.imex.online/ --admin-secret << HASURA_PROD_SECRET >>
|
||||
hasura metadata reload --endpoint https://db.imex.online/ --admin-secret << HASURA_PROD_SECRET >>
|
||||
hasura migrate apply --endpoint https://db.imex.online/ --admin-secret << parameters.secret >>
|
||||
hasura metadata apply --endpoint https://db.imex.online/ --admin-secret << parameters.secret >>
|
||||
hasura metadata reload --endpoint https://db.imex.online/ --admin-secret << parameters.secret >>
|
||||
|
||||
app-build:
|
||||
docker:
|
||||
@@ -73,9 +73,9 @@ jobs:
|
||||
docker:
|
||||
- image: cimg/node:16.15.0
|
||||
parameters:
|
||||
HASURA_TEST_SECRET:
|
||||
secret:
|
||||
type: string
|
||||
default: ${HASURA_TEST_SECRET}
|
||||
default: $HASURA_TEST_SECRET
|
||||
working_directory: ~/repo/hasura
|
||||
steps:
|
||||
- checkout:
|
||||
@@ -84,9 +84,9 @@ jobs:
|
||||
name: Execute migration
|
||||
command: |
|
||||
npm install hasura-cli -g
|
||||
hasura migrate apply --endpoint https://db.test.bodyshop.app/ --admin-secret << HASURA_TEST_SECRET >>
|
||||
hasura metadata apply --endpoint https://db.test.bodyshop.app/ --admin-secret << HASURA_TEST_SECRET >>
|
||||
hasura metadata reload --endpoint https://db.test.bodyshop.app/ --admin-secret << HASURA_TEST_SECRET >>
|
||||
hasura migrate apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >>
|
||||
hasura metadata apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >>
|
||||
hasura metadata reload --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >>
|
||||
|
||||
test-app-build:
|
||||
docker:
|
||||
@@ -160,6 +160,7 @@ workflows:
|
||||
branches:
|
||||
only: master
|
||||
- hasura-migrate:
|
||||
secret: $HASURA_PROD_SECRET
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
@@ -168,10 +169,11 @@ workflows:
|
||||
branches:
|
||||
only: test
|
||||
- test-hasura-migrate:
|
||||
secret: $HASURA_TEST_SECRET
|
||||
filters:
|
||||
branches:
|
||||
only: test
|
||||
#- admin-app-build:
|
||||
#filters:
|
||||
#branches:
|
||||
#only: master
|
||||
#only: master
|
||||
Reference in New Issue
Block a user