Skip to content

Commit 6b7692a

Browse files
committed
Added travis CI
1 parent 0401c70 commit 6b7692a

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

.travis.deploy.artifacts.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
PROJECT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -B | grep -v '\[')
2+
if [[ "$PROJECT_VERSION" =~ .*SNAPSHOT ]] && [[ "${TRAVIS_BRANCH}" =~ ^master$|^[0-9]+\.[0-9]+$ ]] && [[ "${TRAVIS_PULL_REQUEST}" = "false" ]];
3+
then
4+
mvn deploy -s .travis.maven.settings.xml -DskipTests -B;
5+
fi

.travis.maven.settings.xml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
6+
<interactiveMode>false</interactiveMode>
7+
8+
<servers>
9+
<server>
10+
<id>sonatype-nexus-snapshots</id>
11+
<username>${env.SONATYPE_NEXUS_USERNAME}</username>
12+
<password>${env.SONATYPE_NEXUS_PASSWORD}</password>
13+
</server>
14+
</servers>
15+
16+
</settings>
17+

.travis.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
language: java
2+
branches:
3+
only:
4+
- master
5+
- /^\d+\.\d+$/
6+
jobs:
7+
include:
8+
- stage: test
9+
name: "OracleJDK 8"
10+
jdk: oraclejdk8
11+
script: mvn -q clean verify -B
12+
- if: type != pull_request
13+
name: "OpenJDK 11"
14+
jdk: openjdk11
15+
script: mvn -q clean verify -B
16+
- stage: deploy
17+
name: "Deploy to Sonatype's snapshots repository"
18+
if: type != pull_request
19+
script: bash .travis.deploy.artifacts.sh
20+
notifications:
21+
email:
22+
recipients:
23+
24+
on_success: always
25+
on_failure: always

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Vertx shell
22

3+
[![Build Status](https://travis-ci.org/vert-x3/vertx-shell.svg?branch=master)](https://travis-ci.org/vert-x3/vertx-shell)
4+
35
## Documentation
46

57
* [Java documentation](http://vertx.io/docs/vertx-shell/java/)

0 commit comments

Comments
 (0)