-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
76 lines (76 loc) · 2.63 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
dist: xenial
language: node_js
node_js:
- 10
sudo: false
cache:
directories:
- "$HOME/.m2/repository"
- "$HOME/.npm"
services:
- docker
addons:
sonarcloud:
organization: waltz-controls
before_install:
- printf "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> ~/.npmrc
jobs:
include:
- stage: build
script: ".travis/build.sh"
- stage: deploy
name: Deploy to SonarCloud
script:
- ".travis/build.sh"
- git fetch --unshallow --quiet
- sonar-scanner -Dsonar.login=${SONAR_TOKEN} -Dsonar.projectKey=waltz-controls_waltz
-Dsonar.projectName=waltz -Dsonar.projectVersion=$TRAVIS_BRANCH -Dsonar.sources=.
-Dsonar.exclusions=jmvc/**,docs/**
- name: Deploy to Amazon cloud
env:
- REST_API_PROTOCOL="http"
- REST_API_HOST="ec2-3-120-206-90.eu-central-1.compute.amazonaws.com"
- REST_API_PORT=10001
- REST_API_VERSION="rc4"
- TANGO_HOST="ip-172-31-39-180"
- TANGO_PORT=10000
- VERSION="$TRAVIS_BRANCH"
script:
- ".travis/build.sh"
- mv dist/waltz.war dist/$TRAVIS_BRANCH.war
deploy:
- provider: script
script: bash .travis/deploy.sh
skip_cleanup: true
on:
all_branches: true
- name: Deploy to GitHub releases
script: ".travis/build.sh"
deploy:
- provider: releases
prerelease: true
api_key: "$GITHUB_OAUTH_TOKEN"
file: dist/waltz.war
skip_cleanup: true
on:
tags: true
- name: Deploy to docker hub
env:
- REGISTRY_USER=ingvord DOCKER_IMAGE=tangocs/waltz
script:
- ".travis/build.sh"
- docker build --pull --tag "$DOCKER_IMAGE" .
- docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS"
- docker tag "$DOCKER_IMAGE" "$DOCKER_IMAGE:$TRAVIS_BRANCH"
deploy:
- provider: script
script: docker push "$DOCKER_IMAGE:latest"
on:
branch: master
- provider: script
script: docker push "$DOCKER_IMAGE:$TRAVIS_TAG"
on:
tags: true
env:
global:
secure: EDvrVOdxmsbubWqr9c7eI9hU1vKoB/QE/J54Cz+SjwC5hMeKV43NpY995/FZgDMLadvPNzES1LFHchPlZDzUoLWxqOdZA6K8LzekMSWpdCmg0KVpLDtSoLWI72WKoptig3k1/2zVm/53B+ase0IUjLGI9gLAManc5kYVHbIBSh/F0IESeGZ7mS4Ixg7+S7fLdef9EGWxQOWhEqRfN4BzxufK7UmVHOV+ZFODFgqLq2c0xXrBPbDecajgjaNmAxYN7aUIURpAITcv2OKfbREGWd7GYIVcZ4OxHroxL1dehQru0obsPIzaJQLatQ2lnuP9ZbARzpMvk5320QVbqyYJ9O7WnQ9LD8deLyA5g9fpwRWi1lBrKh7rcEux4iRbmc29HuuCljoqZuOvu0yCGf6MpqkGTycaPChF69NcrkCUEDiJiXmibLVCxoTWubwcJR8vvEOoExe9gLEy525rmY6WKz6NtmVK3tjBD12aVrr8OpHFtvqvkN2wyXHtTV/+ovfjjPW52r5FJrdmLDYAJ2m+wlV57ZjyY2gGeTr1ou85CA8UhtqF1UCHe4uPCU3IiprLYNAdpO7sWPbSy8ttRepexL4PVsTWu/7W/32ac+R7voHwtI/moTEz8lQo0SQrwdqh+GyV98Islf6thNsU7EHbQLH9+W11Fbh4ooWa0j9QM9c=