-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
50 lines (48 loc) · 1.46 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
image: node:14
definitions:
# services:
# postgres-test:
# image: postgres:13
# variables:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: tutor-timetable-v2-test
steps:
- step: &build-test
name: Lint, Test and Test Build
script:
- yarn
- yarn eslint-check && yarn prettier-check
- yarn build
# - cp .env.example .env && yarn test
# services:
# - postgres-test
pipelines:
pull-requests:
"**":
- step: *build-test
"{feature,story,bugfix}/*":
- step: *build-test
- step:
name: 'Deployment to Staging'
deployment: staging
script:
- chmod +x ./scripts/staging/deploy.sh
- ./scripts/staging/deploy.sh $(cut -d'/' -f2 <<<$BITBUCKET_BRANCH | tr '[:upper:]' '[:lower:]')
branches:
development:
- step: *build-test
- step:
name: 'Push changes back to github'
script:
- git config user.name "Mike Pham"
- git config user.email "[email protected]"
- git remote add github [email protected]:CSSE1001/queue.git
- git push github development:main
- step:
name: 'Deployment to Production'
deployment: production
trigger: 'manual'
script:
- chmod +x ./scripts/production/deploy.sh
- ./scripts/production/deploy.sh