This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
.travis.yml
32 lines (30 loc) · 1.95 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
language: java
jdk:
- openjdk8
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:
-
provider: script
script: mvn deploy --settings ~/settings.xml -DskipTests -B -U
skip_cleanup: true
on:
repo: mulesoft-labs/raml-java-tools
all_branches: true
condition: $TRAVIS_BRANCH =~ ^release/[0-9]+.[0-9]+.[0-9]+$
-
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: mulesoft-labs/raml-java-tools
tags: true
condition: "$TRAVIS_TAG =~ ^[0-9]+.[0-9]+.[0-9]+$"