pipeline:
image: alpine:latest
stages:
- name: test
commands:
- yarn install --dev-only
- yarn test
test_report:
format: junit-coverage
path: ./tests/coverage/
- name: build
env:
- NODE_ENV=production
- DATABASE_URL=$DATABASE_URL
commands:
- yarn install
- yarn generate
- yarn build
save_artefacts:
- distributables: ./dist/
- name: deploy-staging
manual: true
commands:
- ./scripts/deploy.sh --env=staging /app/dist/
load_artefacts:
- distributables:/app/dist/
- name: deploy-prod
manual: true
commands:
- ./scripts/deploy.sh --env=production /app/dist/
load_artefacts:
- distributables:/app/dist/