-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtravis.yml
55 lines (55 loc) · 1.49 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
49
50
51
52
53
54
55
language: java
jdk:
- openjdk8
install: true
env:
-HEROKU_API_KEY=$HEROKU_TOKEN
-TAG=test
services:
- docker
before_install:
- npm install -g @angular/cli
stages:
- name: test
- name: build
- name: deploy
jobs:
include:
- stage: test
script:
- cd server
- chmod +x mvnw
#- mvn test
- cd ..
- echo "test stage works"
- stage: build
script:
- cd front
- npm install
- npm install express
- ng build --prod
- cd ..
- cd server
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- echo "build stage works"
- stage: deploy
script:
- curl https://cli-assets.heroku.com/install-standalone.sh | sh
- docker login --username=_ --password=$HEROKU_TOKEN registry.heroku.com
- cd server
- mvn package -DskipTests=true
- docker build -t registry.heroku.com/nokia3s-server/web -f Dockerfile.prod .
- cd ..
- cd front
- npm install
- npm install express
- ng build --prod
- docker build -t registry.heroku.com/nokia3s-front/web -f Dockerfile.prod .
- docker push registry.heroku.com/nokia3s-server/web
- docker push registry.heroku.com/nokia3s-front/web
- /usr/local/bin/heroku container:release web -a nokia3s-server
- /usr/local/bin/heroku container:release web -a nokia3s-front
- echo "deploy stage works"
cache:
directories:
- $HOME/.m2