From 1bb8b609894938c024b2ef497398013bee3acfb4 Mon Sep 17 00:00:00 2001 From: Konstantin Maltsev Date: Fri, 20 Jan 2017 15:57:01 +0700 Subject: [PATCH] add travis --- .travis.yml | 37 +++++++++++ .travis/deploy.sh | 9 +++ .travis/settings.xml | 22 +++++++ README.md | 1 + pom.xml | 146 +++++++++++++++++++++++++++++++++++-------- 5 files changed, 188 insertions(+), 27 deletions(-) create mode 100644 .travis.yml create mode 100755 .travis/deploy.sh create mode 100644 .travis/settings.xml create mode 100644 README.md diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..39c33be --- /dev/null +++ b/.travis.yml @@ -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}" diff --git a/.travis/deploy.sh b/.travis/deploy.sh new file mode 100755 index 0000000..d8109d2 --- /dev/null +++ b/.travis/deploy.sh @@ -0,0 +1,9 @@ +if [ ! -z "$TRAVIS_TAG" ] +then + echo "on a tag -> set pom.xml 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 diff --git a/.travis/settings.xml b/.travis/settings.xml new file mode 100644 index 0000000..1167e94 --- /dev/null +++ b/.travis/settings.xml @@ -0,0 +1,22 @@ + + + + ossrh + ${env.SONATYPE_USERNAME} + ${env.SONATYPE_PASSWORD} + + + + + ossrh + + true + + + ${env.GPG_EXECUTABLE} + ${env.GPG_PASSPHRASE} + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b2cc315 --- /dev/null +++ b/README.md @@ -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) diff --git a/pom.xml b/pom.xml index 71e4398..392bdf9 100644 --- a/pom.xml +++ b/pom.xml @@ -1,28 +1,120 @@ - + - 4.0.0 - ru.sbtqa.tag.datajack.adaptors - datajack-json-adpator - 1.0-SNAPSHOT - jar - - - ru.sbtqa.tag - datajack - 1.1-SNAPSHOT - jar - - - junit - junit - 4.12 - test - jar - - - - UTF-8 - 1.7 - 1.7 - - + 4.0.0 + ru.sbtqa.tag.datajack.adaptors + datajack-json-adaptor + datajack-json-adaptor + 1.0-SNAPSHOT + jar + datajack-json-adaptor description + http://github.com/sbtqa/datajack-json-adaptor + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + Viktor Sidochenko + viktor.sidochenko@gmail.com + sbtqa + http://github.com/sbtqa + + + + scm:git:git://github.com/sbtqa/datajack-json-adaptor + scm:git:ssh://github.com:sbtqa/datajack-json-adaptor.git + https://github.com/sbtqa/datajack-json-adaptor/tree/master + + + UTF-8 + 1.7 + 1.7 + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + ru.sbtqa.tag + datajack + 1.2.0 + jar + + + junit + junit + 4.12 + test + jar + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.3 + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + ossrh + https://oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + \ No newline at end of file