diff --git a/.circleci/config.yml b/.circleci/config.yml index ef8ec6675..6f071ef2c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,10 @@ jobs: hasura-migrate: docker: - image: cimg/node:16.15.0 - + parameters: + HASURA_PROD_SECRET: + type: string + default: ${HASURA_PROD_SECRET} working_directory: ~/repo/hasura steps: - checkout: @@ -32,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 << 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 >> app-build: docker: @@ -69,7 +72,10 @@ jobs: test-hasura-migrate: docker: - image: cimg/node:16.15.0 - + parameters: + HASURA_TEST_SECRET: + type: string + default: ${HASURA_TEST_SECRET} working_directory: ~/repo/hasura steps: - checkout: @@ -78,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 << 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 >> test-app-build: docker: