forked from andizimmerer/DB-Wahlinformationssystem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (54 loc) · 1.57 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
56
57
58
59
60
stages:
- name: build
- name: deploy
if: branch = master AND type = push
- name: release
if: branch = master AND type = push
jobs:
include:
- stage: build
name: "Build Backend"
language: rust
rust: nightly
before_install:
- cd WIS/backend
- stage: build
name: "Build Frontend"
language: node_js
before_install:
- cd WIS/web
script:
- npm build
- stage: deploy
name: "Deploy Backend Docker image"
services: docker
before_script:
- cd WIS/backend
script:
- docker build -t registry.heroku.com/wis-backend/web --build-arg BUILD_VERSION="Commit $TRAVIS_COMMIT on branch '$TRAVIS_BRANCH'" .
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login --username=_ --password-stdin registry.heroku.com
deploy:
provider: script
script: docker push registry.heroku.com/wis-backend/web
- stage: deploy
name: "Deploy Frontend Docker image"
services: docker
before_script:
- cd WIS/web
script:
- docker build -t registry.heroku.com/wis-frontend/web --build-arg BUILD_VERSION="Commit $TRAVIS_COMMIT on branch '$TRAVIS_BRANCH'" .
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login --username=_ --password-stdin registry.heroku.com
deploy:
provider: script
script: docker push registry.heroku.com/wis-frontend/web
- stage: release
name: "Releasing images to Heroku"
addons:
apt:
sources:
- heroku
script:
- heroku container:release web --app wis-backend
- heroku container:release web --app wis-frontend