-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
44 lines (43 loc) · 1.64 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
dist: trusty
sudo: false
notifications:
email: false
env:
- RELEASE_TAG="release-$TRAVIS_BUILD_NUMBER"
if: tag IS blank
jobs:
include:
- stage: build and release to github
language: java
jdk: oraclejdk8
install: skip
script: ./gradlew clean build -x test
before_deploy:
- git config --local user.name "Build Bot"
- git config --local user.email "[email protected]"
- git tag -f $RELEASE_TAG
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file:
- "applications/tripit/build/libs/tripit-1.0-SNAPSHOT.war"
- "applications/hotels-ms/build/libs/hotels-ms-1.0-SNAPSHOT.jar"
- "applications/flights-ms/build/libs/flights-ms-1.0-SNAPSHOT.jar"
skip_cleanup: true
- stage: deploy to test
language: java
script:
- echo "Downloading $RELEASE_TAG"
- wget -P applications/tripit/build/libs https://github.com/$GITHUB_USERNAME/pcf-training-final/releases/download/$RELEASE_TAG/tripit-1.0-SNAPSHOT.war
- wget -P applications/hotels-ms/build/libs https://github.com/$GITHUB_USERNAME/pcf-training-final/releases/download/$RELEASE_TAG/hotels-ms-1.0-SNAPSHOT.jar
- wget -P applications/flights-ms/build/libs https://github.com/$GITHUB_USERNAME/pcf-training-final/releases/download/$RELEASE_TAG/flights-ms-1.0-SNAPSHOT.jar
before_deploy:
- echo "Deploying $RELEASE_TAG to test"
deploy:
provider: cloudfoundry
api: $CF_API_URL
username: $CF_USERNAME
password: $CF_PASSWORD
organization: $CF_ORG
space: test
skip_ssl_validation: true