-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (54 loc) · 2.68 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
language: java
install: true
sudo: required
env:
global:
- secure: WfqSSJPSSbb0LqHYJTrOndOqOrmH7DGSq6PTAErMEIC0b3IMryyxy1c5KGFS47Hr3pd9jCXYRXp8D8hYPWN1F0Oy1jRSkf4/53QFA8HdrGYe0KAc+wDOas/LPSSAAZFhqad+lKOYQKx0MGRuxAIg5l4C/ptdUK4HR2jTLsKcZ/MdmRrkGi4uKsvaa4upW+dpvOU8qncOSBgfzcBvdn51loeD69TxrH3Ug/zeJpsDF+pam9TX2+eukQgtdq7TNUA+ZjRxCBqJXl8bqT13EeeaBkUJt3ufc8PQQ8VwY+X0Xk781rEHg/qjMRxy9Bx/PIYBa+/dz412DHclY74mQvuN6grxr1gk5x/0ErC1q3YLXHaaWz6lF+5AwznNoS3DtyYvmSJhPzU9+O/ctvqGvzDvO5LCHPzX2gK7ckaH5RS9xVL6fgBVmoJED3FpyU/nC5uBD2I8leZc0POHIyTTcZ+NZYJJBX6YG17BGTlIDjyGb/xBWWSnsn5KtuoxFizrRzuJqDi4SM0Sl5KC/LjHgJPOjBspxC9SnLaXMhx6/JM1b13Fzd0ow9wx7q2TfPnldLbVVtydk6EjC+ogb64vtOlHDD6T0isGdLQ6M3SwwVAsAfe63mmvJAj4th5/oR4cQs6xWP3peeu3BGAEJ9r8oQDtoGagIDSWLSut9u4uPOJpvbc=
- TRAVIS_REPO_SLUG: christian-draeger/jenkins-monitor
matrix:
include:
- jdk: oraclejdk8
before_install:
- sudo apt-get -qq update # needed by launch4j plugin
- sudo apt-get install -y lib32z1 # needed by launch4j plugin
- sudo apt-get install -y lib32ncurses5 # needed by launch4j plugin
- sudo apt-get install -y lib32bz2-1.0 # needed by launch4j plugin
- export TZ=Europe/Berlin
- export VERSION=$(date +"%d-%m-%Y").v${TRAVIS_BUILD_NUMBER}
script:
- mvn clean install -Prelease
- export JAR=$(ls target/jenkins-monitor-*.jar)
- export DEB=$(ls target/jenkins-monitor-*.deb)
# - export EXE=$(ls target/jenkins-monitor-*.exe)
- cd $TRAVIS_BUILD_DIR # Make Sure we are in the Build Directory
- git remote rm origin # Remove Remotes Added by TravisCI
- git remote add origin https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git # Add Remote with Secure Key
- git config --global user.email christian-draeger1@gmail.com # Set Git Variables
- git config --global user.name Travis CI
- git config --global push.default simple
- git checkout master # "Make sure we have master branch checked out
- git add -f ${JAR} ${DEB} #${EXE} # adding files to commit (needs -f if "target" is on .gitignore)
- git commit -am "${VERSION} [ci skip]" # [ci skip] required - otherwise travis would make a new build for this commit
before_deploy:
- cd $TRAVIS_BUILD_DIR # Make Sure we are in the Build Directory
- git tag ${VERSION} -am "${VERSION}"
- sudo git push origin master && git push origin master --tags
deploy:
provider: releases
api_key:
secure: ${GITHUB_TOKEN} # how to create github token: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
file:
- ${JAR}
- ${DEB}
# - ${EXE}
skip_cleanup: true
on:
repo: "${TRAVIS_REPO_SLUG}"
tags: false
branches:
only:
- "master"
notifications:
email:
on_success: change
on_failure: change