forked from vmware-tanzu-learning/pal-tracker-distributed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
92 lines (91 loc) · 3.48 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
dist: trusty
sudo: required
notifications:
email: false
env:
- RELEASE_TAG="release-$TRAVIS_BUILD_NUMBER"
stages:
- build and publish
- deploy
- migrate
if: tag IS blank
jobs:
include:
- stage: build and publish
language: java
jdk: oraclejdk8
addons:
mariadb: '10.2'
install: skip
before_script:
- mysql -uroot < databases/create_databases.sql
- ./gradlew testMigrate
script: ./gradlew clean build
before_deploy:
- git config --local user.name "Travis CI"
- git config --local user.email "[email protected]"
- git tag -f $RELEASE_TAG
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file:
- "applications/allocations-server/build/libs/allocations-server.jar"
- "applications/backlog-server/build/libs/backlog-server.jar"
- "applications/registration-server/build/libs/registration-server.jar"
- "applications/timesheets-server/build/libs/timesheets-server.jar"
skip_cleanup: true
- stage: deploy
language: java
script:
- echo "Downloading allocations server $RELEASE_TAG"
- wget -P applications/allocations-server/build/libs https://github.com/$GITHUB_USERNAME/pal-tracker-distributed/releases/download/$RELEASE_TAG/allocations-server.jar
before_deploy:
- cp manifest-allocations.yml manifest.yml
- echo "Deploying allocations server $RELEASE_TAG"
deploy: &cloudfoundry
provider: cloudfoundry
api: $CF_API_URL
username: $CF_USERNAME
password: $CF_PASSWORD
organization: $CF_ORG
space: review
- stage: deploy
language: bash
script:
- echo "Downloading backlog server $RELEASE_TAG"
- wget -P applications/backlog-server/build/libs https://github.com/$GITHUB_USERNAME/pal-tracker-distributed/releases/download/$RELEASE_TAG/backlog-server.jar
before_deploy:
- cp manifest-backlog.yml manifest.yml
- echo "Deploying backlog server $RELEASE_TAG"
deploy:
<<: *cloudfoundry
- stage: deploy
language: bash
script:
- echo "Downloading registration server $RELEASE_TAG"
- wget -P applications/registration-server/build/libs https://github.com/$GITHUB_USERNAME/pal-tracker-distributed/releases/download/$RELEASE_TAG/registration-server.jar
before_deploy:
- cp manifest-registration.yml manifest.yml
- echo "Deploying registration server $RELEASE_TAG"
deploy:
<<: *cloudfoundry
- stage: deploy
language: bash
script:
- echo "Downloading timesheets server $RELEASE_TAG"
- wget -P applications/timesheets-server/build/libs https://github.com/$GITHUB_USERNAME/pal-tracker-distributed/releases/download/$RELEASE_TAG/timesheets-server.jar
before_deploy:
- cp manifest-timesheets.yml manifest.yml
- echo "Deploying timesheets server $RELEASE_TAG"
deploy:
<<: *cloudfoundry
- stage: migrate
language: java
before_install:
- wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
- echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
- sudo apt-get update
- sudo apt-get install cf-cli
script:
- cf login -a $CF_API_URL -u $CF_USERNAME -p $CF_PASSWORD -o $CF_ORG -s review
- ./gradlew cfMigrate