Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
add travis
Browse files Browse the repository at this point in the history
  • Loading branch information
kosteman committed Jan 20, 2017
1 parent 9e2772d commit 1bb8b60
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 27 deletions.
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
language: java
addons:
sonarqube: true
jdk:
- oraclejdk8
before_install:
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
install:
- mvn clean --settings .travis/settings.xml install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip -B -V
script:
- mvn org.jacoco:jacoco-maven-plugin:prepare-agent sonar:sonar -Dsonar.login=$SONAR_TOKEN
deploy:
- provider: script
script: ".travis/deploy.sh"
skip_cleanup: true
on:
repo: sbtqa/datajack-json-adaptor
branch: master
jdk: oraclejdk8
- provider: script
script: ".travis/deploy.sh"
skip_cleanup: true
on:
repo: sbtqa/datajack-json-adaptor
tags: true
jdk: oraclejdk8
notifications:
email: false
slack:
rooms:
- secure: r2Z0wF6ZVvEy4EZ9Trm9EIwj5aTwRrmY69dtX4U1+7Oy0QBlSGYlY3SEkshrXs9PfrfuiO1XiFhZ9zUbZihq6acImzwBW0oy4X+PMZrW4agubI/rFWx6gqqIvfNfS2eJdTkPNGIT9F7MCQce2Ek+IFQkGxgAJhyCZMXNPG5JkJXGTj4eNM6EWA/0eM3HiiebRZJ9bOrKdkh8gsnuAa6g46k2tp/c4BTSCUgBVNdd25PytjC2tx4/eEI71STmPFBNeFP0pz1aSznS3uwikBuGXDvoLjG+4B0Fmm+opWmV+o6AGls0Uf64bQc5i2nG7gXx8X5rnqKRTKt4jBz7l/6LnQGYHkswdHrYRtuu5bs2LTLhAp9jr0vH18XCIdMZJ6KcZO9mkdZt9hfUbzL3zlFZSCLPz9HGSMQrEkquVGXp4ydYnPBeClGX6u11+6Dp/UdFO8/5XtHl/zSxdahoXg+HWKVyMnr7N1Q6IQPeJX6Ur5XXuhWQzHqjOkInMFSryVARlpTOozBn96o/+SrwQjIsVvXfcFPI82bUaJUbdrYfKylquHY03ofHeqEcq+Rh9QSwSE00ansxsoz+tF2UoNmyByWISPb3OkT1nHy4NcwOjA3OYLw+174Cp/i9DcJXtITu6QGV295JRXhVOrcEDywRuY3LMrVgL/G9ms6Fxb/Lmjc=
template:
- "Build status: %{message}"
- "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{commit_message}"
- "Change view : %{compare_url}"
- "Build details : %{build_url}"
9 changes: 9 additions & 0 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if [ ! -z "$TRAVIS_TAG" ]
then
echo "on a tag -> set pom.xml <version> to $TRAVIS_TAG"
mvn --settings .travis/settings.xml org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=$TRAVIS_TAG 1>/dev/null 2>/dev/null
else
echo "not on a tag -> keep snapshot version in pom.xml"
fi

mvn clean deploy --settings .travis/settings.xml -DskipTests=true -B -U
22 changes: 22 additions & 0 deletions .travis/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# datajack-json-adaptor [![Build Status](https://travis-ci.org/sbtqa/datajack-json-adaptor.svg?branch=master)](https://travis-ci.org/sbtqa/datajack-json-adaptor)
146 changes: 119 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.sbtqa.tag.datajack.adaptors</groupId>
<artifactId>datajack-json-adpator</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>ru.sbtqa.tag</groupId>
<artifactId>datajack</artifactId>
<version>1.1-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
<type>jar</type>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
</project>
<modelVersion>4.0.0</modelVersion>
<groupId>ru.sbtqa.tag.datajack.adaptors</groupId>
<artifactId>datajack-json-adaptor</artifactId>
<name>datajack-json-adaptor</name>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<description>datajack-json-adaptor description</description>
<url>http://github.com/sbtqa/datajack-json-adaptor</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>Viktor Sidochenko</name>
<email>[email protected]</email>
<organization>sbtqa</organization>
<organizationUrl>http://github.com/sbtqa</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/sbtqa/datajack-json-adaptor</connection>
<developerConnection>scm:git:ssh://github.com:sbtqa/datajack-json-adaptor.git</developerConnection>
<url>https://github.com/sbtqa/datajack-json-adaptor/tree/master</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>ru.sbtqa.tag</groupId>
<artifactId>datajack</artifactId>
<version>1.2.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 1bb8b60

Please sign in to comment.