forked from grandvizier/kinotimes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shippable.yml
45 lines (37 loc) · 1.61 KB
/
shippable.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
language: node_js
node_js:
- 6.9.4
branches:
only:
- master
env:
global:
- secure: wanIxV23G7lMD7lfzFlcpH2n1tTMRbU6aAc28X2ZlPGhmORCRaE79+t5X6nYOGVDihz/jyrQPAbPpr+HS8EBdKPu0wUAH+3A/HEMh1Lv0xmJOHEqdOqRNHFnmd9pPWH03M+ciwbzn0E65I+47ngstEHYeZnLeaQhzd7YOE/Joto1Hyh7X5Mbu1EC6WpBZV4lJe3WRYxiIcdKneJK26+SdJ5cuY2/mtemjxL7/f+YGH7Du/STAcesElu5KbPpoH/jXENQX7maQq0/VBHIo/bjO6ITcqx8ZoyMvyDK2crddC1vkScbl54QMj2A0DT6TMe4Kp2JNP2IzMspoH7p020VaQ==
- DOCKER_ACC=quay.io/kinotimes
- CI=true
- REACT_APP_KT_BACKEND_PORT=8888
- REACT_APP_KT_PORT=3000
- REACT_APP_KT_URL=http://kinotimes.tk
build:
cache: true
cache_dir_list:
- $SHIPPABLE_BUILD_DIR/backend/node_modules
- $SHIPPABLE_BUILD_DIR/frontend/node_modules
ci:
- npm install -g create-react-app
# build backend
- shippable_retry cd $SHIPPABLE_BUILD_DIR/backend/; npm install
# build frontend
- shippable_retry cd $SHIPPABLE_BUILD_DIR/frontend/; npm install
- cd $SHIPPABLE_BUILD_DIR/frontend/; npm test
- shippable_retry cd $SHIPPABLE_BUILD_DIR/frontend/; npm run build
# build docker images
- docker build -f $SHIPPABLE_BUILD_DIR/frontend/Dockerfile.web -t $DOCKER_ACC/web:$BUILD_NUMBER $SHIPPABLE_BUILD_DIR/frontend/
- docker build -f $SHIPPABLE_BUILD_DIR/backend/Dockerfile.backend -t $DOCKER_ACC/backend:$BUILD_NUMBER --build-arg tmdb_token=$TMDB_TOKEN --build-arg omdb_apikey=$OMDB_APIKEY $SHIPPABLE_BUILD_DIR/backend/
post_ci:
- docker push $DOCKER_ACC/web:$BUILD_NUMBER
- docker push $DOCKER_ACC/backend:$BUILD_NUMBER
integrations:
hub:
- integrationName: quay-integration
type: quay.io