Skip to content
29 changes: 25 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- run:
command: npm run prettier:check
working_directory: e2e
test:
e2e-test:
executor: e2e-runner
steps:
- checkout
Expand Down Expand Up @@ -134,12 +134,16 @@ jobs:
- run:
command: npm run build
working_directory: client
environment:
REACT_APP_GRAPHQL_ENDPOINT: /gql
REACT_APP_REST_ENDPOINT: /rest
REACT_APP_FAQ_URL: faq.team
- persist_to_workspace:
root: .
paths:
- client/build/

prisma-deploy:
prisma-deploy-server:
parameters:
clever-app-id:
type: string
Expand Down Expand Up @@ -171,6 +175,17 @@ jobs:
clever link << parameters.clever-app-id >>
clever deploy --force

prisma-deploy-service:
executor: app-builder
steps:
- checkout
- node/install-packages:
app-dir: server
- run:
name: Deploy prisma
working_directory: server/scripts/prisma_deploy_all/
command: node index.js

app-deploy:
parameters:
clever-app-id:
Expand Down Expand Up @@ -213,20 +228,26 @@ workflows:
- server-lint
- client-lint
- e2e-lint
- test
- e2e-test
- client-build
- app-deploy:
clever-app-id: app_c61407ae-b417-4406-86ed-cfd1acf84466
context: clever-cloud-deployment
requires:
- server-lint
- client-lint
- e2e-lint
- e2e-test
- client-build
filters:
branches:
only: main
- prisma-deploy:
- prisma-deploy-server:
clever-app-id: app_f9c5c1cb-fe9c-41f9-a6c0-793e8326e95b
context: clever-cloud-deployment
requires:
- app-deploy
- prisma-deploy-service:
context: faq-prisma-deployment
requires:
- prisma-deploy-server
2 changes: 1 addition & 1 deletion server/scripts/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const queryManagement = gql => {
// Implicit env required: PRISMA_URL, PRISMA_API_SECRET
const deployPrismaService = (name, stage) => {
const isForcing = process.argv.includes('--force')
run('prisma deploy ' + (isForcing ? '--force' : ''), {
run('npx prisma deploy ' + (isForcing ? '--force' : ''), {
PRISMA_URL: process.env.PRISMA_URL + '/' + name + '/' + stage
})
}
Expand Down