diff --git a/.travis.yml b/.travis.yml
index f5146da8..5ff5a1f5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,29 +7,68 @@ services:
env:
- TANGO_HOST=localhost:10000
+#skip mvn install
+install: /bin/true
+
before_script:
- docker-compose up -d
#TODO wait-for-it
- sleep 30
- docker ps
-
-#skip mvn install
-install: /bin/true
-
script:
- mvn clean install -Ptravis
jdk:
- openjdk8
- openjdk7
-after_success:
- - bash <(curl -s https://codecov.io/bash)
- - mvn sonar:sonar -Ptravis
- - mvn com.gavinmogan:codacy-maven-plugin:coverage -Ptravis
-addons:
- sonarcloud:
- organization: "tango-controls"
- token:
- secure: $SONAR_TOKEN
cache:
directories:
- - '$HOME/.m2/repository'
\ No newline at end of file
+ - '$HOME/.m2/repository'
+
+
+jobs:
+ include:
+ - stage: deploy
+ name: "Deploy to SonarCloud"
+ jdk: openjdk8
+ script:
+ - mvn clean install -Ptravis
+ - mvn sonar:sonar -Ptravis
+ addons:
+ sonarcloud:
+ organization: "tango-controls"
+ token:
+ secure: $SONAR_TOKEN
+ -
+ name: "Deploy to Codacy"
+ jdk: openjdk8
+ script:
+ - mvn clean install -Ptravis
+ - mvn com.gavinmogan:codacy-maven-plugin:coverage -Ptravis
+ -
+ name: "Deploy to Codcov.io"
+ jdk: openjdk8
+ script:
+ - mvn clean install -Ptravis
+ - bash <(curl -s https://codecov.io/bash)
+ -
+ name: "Deploy artifacts"
+ jdk: openjdk8
+ before_script: true #override before_script
+ script:
+ - cd parent
+ - mvn versions:set versions:update-child-modules -DnewVersion=${TRAVIS_BRANCH} -DprocessAllModule -DgenerateBackupPoms=false
+ - cd ..
+ - mvn install -Dmaven.test.skip=true
+ deploy:
+ - provider: script
+ script: bash .travis/maven_deploy.sh
+ skip_cleanup: true
+ on:
+ tags: true
+ - provider: releases
+ file: assembly/target/JTango-${TRAVIS_TAG}.jar
+ api_key: $GITHUB_TOKEN
+ skip_cleanup: true
+ draft: true
+ on:
+ tags: true
diff --git a/.travis/maven_deploy.sh b/.travis/maven_deploy.sh
new file mode 100755
index 00000000..8313f230
--- /dev/null
+++ b/.travis/maven_deploy.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+cp .travis/settings.xml $HOME/.m2/settings.xml
+
+mvn deploy -Dmaven.test.skip=true
+
+cd parent
+mvn versions:set versions:update-child-modules -DprocessAllModules -DnextSnapshot -DgenerateBackupPoms=false
+cd ..
+
+.travis/push.sh
diff --git a/.travis/push.sh b/.travis/push.sh
new file mode 100755
index 00000000..a0057a2c
--- /dev/null
+++ b/.travis/push.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+setup_git() {
+ git config --global user.email "info@tango-controls.org"
+ git config --global user.name "Tango CI"
+ git remote rm origin
+ git remote add origin https://tango-ci:$GITHUB_TOKEN@github.com/tango-controls/JTango.git
+}
+
+commit_website_files() {
+ git add . pom.xml
+ git commit --message "[Tango CI] Next development iteration"
+}
+
+upload_files() {
+ git push --quiet origin HEAD:jtango-9-lts
+}
+
+setup_git
+commit_website_files
+upload_files
diff --git a/.travis/settings.xml b/.travis/settings.xml
new file mode 100644
index 00000000..ab50d13a
--- /dev/null
+++ b/.travis/settings.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ bintray-tango-controls
+ tango-ci
+ ${env.BINTRAY_TOKEN}
+
+
+
diff --git a/parent/pom.xml b/parent/pom.xml
index 5fc334e3..c09c9770 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -291,7 +291,7 @@
https://sonarcloud.io
tango-controls
- jtango-9-lts
+
${env.SONAR_TOKEN}
@@ -299,7 +299,7 @@
org.codehaus.mojo
sonar-maven-plugin
- 3.2
+ 3.6.0.1398
org.jacoco