forked from raml-org/raml-java-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
30 lines (28 loc) · 1.93 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
language: java
sudo: false
dist: trusty
env:
- GPG_EXECUTABLE=gpg
before_install:
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import --no-use-agent --batch --yes; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --no-use-agent --import-ownertrust; fi
- echo "<settings><servers><server><id>mulesoft-releases</id><username>\${env.NEXUS_USER}</username><password>\${env.NEXUS_PASSWORD}</password></server><server><id>mulesoft-snapshots</id><username>\${env.NEXUS_USER}</username><password>\${env.NEXUS_PASSWORD}</password></server><server><id>ossrh</id><username>\${env.OSSRH_USER}</username><password>\${env.OSSRH_PASSWORD}</password></server></servers><profiles><profile><id>ossrh</id><activation><activeByDefault>true</activeByDefault></activation><properties><gpg.executable>\${env.GPG_EXECUTABLE}</gpg.executable><gpg.keyname>\${env.GPG_KEY_NAME}</gpg.keyname><gpg.passphrase>\${env.GPG_PASSPHRASE}</gpg.passphrase></properties></profile></profiles></settings>" > ~/settings.xml
install:
- mvn install --settings ~/settings.xml -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V
deploy:
# This provider handles pr merges to master and creates a SNAPSHOT
- provider: script
script: mvn deploy --settings ~/settings.xml -DskipTests -B -U
skip_cleanup: true
on:
repo: raml-org/raml-java-parser
all_branches: true
condition: $TRAVIS_BRANCH =~ ^master$
# This provider handles tags of version 1.0
- provider: script
script: mvn --settings ~/settings.xml org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=$TRAVIS_TAG; mvn clean deploy --settings ~/settings.xml -DskipTests=true -Psonatype -B -U && mvn clean deploy --settings ~/settings.xml -DskipTests=true -B -U
skip_cleanup: true
on:
repo: raml-org/raml-java-parser
tags: true
condition: $TRAVIS_TAG =~ ^1\.[0-9]+\.[0-9]+$