-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.travis.yml
94 lines (93 loc) · 3.83 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
93
94
language: java
jdk:
- openjdk8
branches:
only:
- develop
- master
addons:
sonarcloud:
organization: sonarcloud
token:
secure: ASXWKuOdMi0AqVIS4iW3xvik39qs2S4CTb6H4cuCSvL09kqwxqGRWrk7ZvK2F4cpqUL+aaLO6pIdIZvbM3CXwSdqbNoADv2Qyui0VKTKBZ9rvG2c/ouNnrPKkvyydVA4VcfKiJnnU9h6kH072XQfQg5oWdjFFPX9iyxT9Mpo+FPfjmoEEBt9j6/5BSZvusBOwkcRKwRBLGV2emR2dKSt/zv/fFThxbXXo7pikVfISJmp9leYqOFuYj32WVmiwJycj0n2m1+Ks44Unq4nolEqWDngDKottOCN2PNMf6Av3jMULbUfRkIMT3n1/J14lsRWbp694E4p0wEXZmCM9f6GkZZoOCNtyeyGu9kK9hRZK9UqjckJAA4aggfiUK2BZK2iWMMK67Wgrvtjf+IqBjFy6Lfgra3d6C29OOxU0nu9nSYo50prgeGkl9KfkCqqr0UioNFNJLwqFcQS2cPNkCvc7oJrOkhxmkxAfDsYexsQhS7VQnsd+PHuxU1o2mtwIe0nadVio2T3ooBiulDzL6XTcmFYWrsCCNkNfbaq5JNTJcTanA7OonSUO6dFK+8eMunNpAc2H4WYlHW5T/BgfvtBAaihdiR6YEKEhCnEe25AmZBryMTc5gTPxPj9up+WevyD8Kj4y9xXyD0py4CyFkUxakVMd0U9jncdKWRwUQ1F3mU=
cache:
directories:
- "~/.m2/repository"
- "~/.sonar/cache"
jobs:
include:
- stage: build_master
if: branch = master AND type = push
before_install:
- echo "Build Started for Master"
- export GPG_TTY=$(tty)
- echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import
- echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust
- cat /etc/hosts
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo
tee /etc/hosts
- cat /etc/hosts
- mvn help:evaluate -N -Dexpression=project.version|grep -v '\[' | cut -d'-'
-f 1 |cut -d'.' -f1-2
- export project_version=$(mvn help:evaluate -N -Dexpression=project.version|grep
-v '\[' | cut -d'-' -f 1 | cut -d'.' -f1-2)
- git config --local user.name "travis-ci"
- git config --local user.email "[email protected]"
- export TRAVIS_JOB_NUMBER1=${TRAVIS_JOB_NUMBER:-$(date +'%Y%m%d%H%M%S')-$(git
log --format=%h -1)}
- TRAVIS_JOB_NUMBER1=$(echo $TRAVIS_JOB_NUMBER1 | cut -d'.' -f1)
- export NEW_VERSION=$project_version.$TRAVIS_JOB_NUMBER1
- mvn versions:set -DnewVersion=$NEW_VERSION
install:
- mvn --settings .maven.xml install -Dgpg.skip -B -V
script:
- mvn clean deploy --settings .maven.xml -DskipTests=true -B -U -Prelease
after_success:
- mvn coveralls:report
before_deploy:
- git tag $NEW_VERSION
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file:
- symspell-lib/target/symspell-lib-$NEW_VERSION.jar
on:
repo: MighTguY/customized-symspell
skip_cleanup: true
name: $project_version
after_deploy:
- mvn versions:set -DnewVersion=$NEW_VERSION-SNAPSHOT
- sh .travis/push.sh
- stage: build_develop
if: branch = develop AND type = push
before_install:
- echo "Build Started for Develop"
- export GPG_TTY=$(tty)
- echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import
- echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust
- cat /etc/hosts
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo
tee /etc/hosts
- cat /etc/hosts
install:
- mvn --settings .maven.xml install -Dgpg.skip -B -V
script:
- mvn cobertura:cobertura
after_success:
- bash <(curl -s https://codecov.io/bash)
- stage: build_pr
if: type = pull_request
before_install:
- echo "Build Started for PR $TRAVIS_PULL_REQUEST"
- export GPG_TTY=$(tty)
- echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import
- echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust
- cat /etc/hosts
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo
tee /etc/hosts
- cat /etc/hosts
install:
- mvn --settings .maven.xml install -Dgpg.skip -B -V