-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (53 loc) · 6.11 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
language: java
jdk:
- openjdk8
stages:
- test
# NOTE: this stage will perform tagging commits to the GitHub repository, why we run last
- name: release-artifacts
if: branch = master
before_install:
# Ensure the settings we want to use are in place before running the default mvn install
- cp ./travis/maven-settings.xml $HOME/.m2/settings.xml
jobs:
include:
- stage: test
script:
- mvn clean test
- mvn --batch-mode release:prepare -DdryRun=true # Ensure we don't have any external SNAPSHOT dependencies
- stage: release-artifacts
services:
- docker
env:
# GITHUB_USERNAME
- secure: "eQkD6wfuoUPPHxQJ6cCVJ141TV7gbRnAPj6misu50ckvvt/0jw+bqqH3eHoJqfCk1F1nzThRgTUGTfkFXlItNF5KMGB4w1CcdFeo3gy6eOPXD5Qk4jOHo77Jz2ymWHadScI8Zz/+ggs1S/1gB0A0xvvSfJcgbA2XiXfFpYGFEP+Y/vqlKVA5LJb3Xt8E/jz69ZwW1/oC/WMpJjkGQ444wHnEWtomzSeYt5H5pvcHuU5ALUpDkrz7iAN4z2aXvCPQrClze7Ze52xbYIGvWj3egrS4dX3UdvnUv1+D3p+iWQRnX6jqjkvBNzHExizIDJ1K+wUTHTPEbWoN/Cu0KZSk0f33te+5dxg/3ixVlbB0nmUZdvysQN3LzbiwM/mBlA+bW+kRz1T818N2YYS2opBShNO+/pq3uL0oQkuryw+ZoyFWcue/bCHH6aTaqnjvDbxtgUkZ5uZEl1dFt5XIz/gkSlXMPEEcNQtBGpvMFigmnzern/Qfibr8yPaD+7DKh4WLY8iahRLyzn6ixl0kuRYdx9r4LWpASWvXHs1YcjH5gcP96Geb6HJ/4Rt2mdv/Ea0wtICMHqaRTmSyB9qGz7pXmB0n8fGnED06n9Dkob0rd+jV7COt2x+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B6RSzG1onN8MUs58XZveLoMUPCGSSE3NZYKqindtoZS2mgefa8zkvRgjHAIrow+XT/JyEfP9LCIZ565n2OOWjS/Thdn06aFJHOXs34nsbDHG52YuHJdWRi4bDaPt7cue800nzYC2I6vO96Oae/6adhTkzz2Z24U8HpuuXQnLKkF+4cia3eMhSo6soG+dAnMiFhtaf0xdtio5bnM6Dgj72teiHYuZ74LxN+XTM660He6x2ALc0kjs54vRij+581RKrerO54tNFz4H3NhEBfAiGQkwVooIDMvxJN31M77dkcnEJE3BXhQ7T6iXq0ui83+Q4J3vCtqlPU="
script:
# Git fix based on: https://github.com/sbt/sbt-release/issues/210
- echo "Fixing git setup for $TRAVIS_BRANCH in preparation for release"
- git checkout ${TRAVIS_BRANCH}
- git branch -u origin/${TRAVIS_BRANCH}
- git config branch.${TRAVIS_BRANCH}.remote origin
- git config branch.${TRAVIS_BRANCH}.merge refs/heads/${TRAVIS_BRANCH}
# Release Maven Artifacts
- echo "Maven artifacts release steps"
- mvn -e --batch-mode release:prepare -DscmCommentPrefix="[maven-release-plugin][skip travis]" # NOTE: this stop's travis from building based on the tag's commit/push.
- mvn release:perform -Pbintray
# Release Docker Image(s)
- echo "Docker image(s) release steps"
- echo "$DOCKER_API_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin ctjoreilly-docker-test-image-repository.bintray.io
- cd ./target/checkout/target # Use the 'mvn release:perform' checkout to construct the image, so that we are using the same artifacts as deployed to the maven repository
- cp ./classes/Dockerfile .
- cp ./classes/docker-*.sh .
- chmod 764 *.sh
- ./docker-build.sh
- ./docker-push.sh