-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
48 lines (43 loc) · 1.15 KB
/
.travis.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
language: node_js
node_js:
- "stable"
services:
- mongodb
- docker
cache:
directories:
- node_modules
jobs:
include:
- stage: "Test"
name: "Backend"
script:
- cd backend
- yarn install
- yarn testCI
- yarn lint
- cd ..
- script:
- cd frontend
- yarn install
- yarn lint
- "CI=true yarn test"
- "cd .."
name: "Frontend"
- stage: "Build"
if: branch = master
name: "Backend y Frontend"
script:
- docker build --file=frontend/docker/Dockerfile ./frontend --tag practicasdesachinwenwenchas/frontend:latest
- docker build --file=backend/docker/Dockerfile ./backend --tag practicasdesachinwenwenchas/backend:latest
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push practicasdesachinwenwenchas/frontend:latest
- docker push practicasdesachinwenwenchas/backend:latest
notifications:
email:
recipients:
on_success: change
on_failure: always