-
Notifications
You must be signed in to change notification settings - Fork 1
/
bitbucket-pipelines.yml
108 lines (106 loc) · 4.24 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: atlassianlabs/docker-node-jdk-chrome-firefox
pipelines:
pull-requests:
'**':
- step:
name: Install and test Client
caches:
- node
script:
- ./authorEmailCheck.sh
- Xvfb :99 -ac -screen 0 1920x1080x24 &
- pushd client
- npm install
- npm run build:prod
- npm run lint
- npm run coverage -- --browsers ChromeHeadlessNoSandbox
- popd
artifacts:
- ~/client/out
# - step:
# name: Install and test Server
# caches:
# - node
# script:
#- pushd server
#- npm install
# TODO: Reenable once there are some tests
# - npm run test
#- popd
# artifacts:
# - ~/server/out
branches:
'{release/*, hotfix/*}':
- step:
name: Deploy Client In staging to prepare for release
caches:
- node
deployment: staging
script:
- ./authorEmailCheck.sh
- pushd client
- npm install
- >
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install -y google-chrome-stable xvfb procps
- npm run test:ci
#- npm run e2e:ci # TODO
- npm run build:prod
- pipe: atlassian/firebase-deploy:0.3.6
variables:
FIREBASE_TOKEN: '$FIREBASE_TOKEN_CI_STAGING'
PROJECT_ID: 'log2990-104-staging'
- popd
'master':
- step:
name: Deploy Client In Production
caches:
- node
deployment: production
script:
- ./authorEmailCheck.sh
- pushd client
- npm install
- >
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install -y google-chrome-stable xvfb procps
- npm run test:ci
#- npm run e2e:ci # TODO
- npm run build:prod
- pipe: atlassian/firebase-deploy:0.3.6
variables:
FIREBASE_TOKEN: '$FIREBASE_TOKEN_CI'
PROJECT_ID: 'log2990-104'
- popd
develop:
- step:
name: Deploy Client In dev
caches:
- node
deployment: test
script:
- ./authorEmailCheck.sh
- pushd client
- npm install
- >
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install -y google-chrome-stable xvfb procps
- npm run test:ci
#- npm run e2e:ci # TODO
- npm run build:prod
- pipe: atlassian/firebase-deploy:0.3.6
variables:
FIREBASE_TOKEN: '$FIREBASE_TOKEN_CI_DEV'
PROJECT_ID: 'log2990-104-dev'
- popd