forked from inspectIT/inspectit-ocelot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
150 lines (141 loc) · 5.61 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
language: java
dist: trusty
jdk:
- oraclejdk8
- oraclejdk9
- oraclejdk11
- openjdk8
#enable caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/ibm-jdk-installer/
install: true
script: ./gradlew jmhCompile test systemTest
after_failure:
- chmod +x ./resources/upload-test-reports.sh
- ./resources/upload-test-reports.sh
jobs:
include:
- name: "JDK ibmjdk8 Java"
sudo: true
install:
- wget -nc -O $HOME/ibm-jdk-installer/ibm-sdk.bin https://s3-eu-west-1.amazonaws.com/inspectit-oce-files/ibm-java-sdk-8.0-5.26-x86_64-archive.bin || true
- sudo chmod +x $HOME/ibm-jdk-installer/ibm-sdk.bin
- echo "INSTALLER_UI=silent" > $HOME/ibm-install.properties
- echo "USER_INSTALL_DIR=$HOME/ibm-jdk-8" >> $HOME/ibm-install.properties
- echo "LICENSE_ACCEPTED=TRUE" >> $HOME/ibm-install.properties
- export PS1=">"
- sudo $HOME/ibm-jdk-installer/ibm-sdk.bin -i silent -f $HOME/ibm-install.properties
- sudo update-alternatives --install "/usr/bin/java" "java" "$HOME/ibm-jdk-8/bin/java" 1
- sudo update-alternatives --set "java" "$HOME/ibm-jdk-8/bin/java"
- sudo update-alternatives --install "/usr/bin/javac" "javac" "$HOME/ibm-jdk-8/bin/javac" 1
- sudo update-alternatives --set "javac" "$HOME/ibm-jdk-8/bin/javac"
- export JAVA_HOME=$HOME/ibm-jdk-8
- java -version
script: ./gradlew test systemTest
after_failure:
- chmod +x ./resources/upload-test-reports.sh
- ./resources/upload-test-reports.sh
- stage: deploy
name: "Code Coverage Reporting"
jdk: oraclejdk8
install: ./gradlew build codeCoverageReport
script:
# upload coverage report
- bash <(curl -s https://codecov.io/bash)
- name: "Create and Release Artifacts"
jdk: oraclejdk8
sudo: true
rvm:
- 2.4
before_install:
- if [ -z "${TRAVIS_TAG}" ]; then RELEASE_VERSION="SNAPSHOT-${TRAVIS_BUILD_NUMBER}"; else RELEASE_VERSION="${TRAVIS_TAG}";fi
- echo "Setting version to $RELEASE_VERSION"
- if [ -z "${TRAVIS_TAG}" ]; then echo "Not release build - skipping docker login."; else echo "$DOCKER_HUB_PW" | docker login -u "$DOCKER_HUB_USER" --password-stdin;fi
# if it is a release build package demo and push agent docker image
install:
- ./gradlew -PbuildVersion=$RELEASE_VERSION assemble packageDocumentation
- if [ -n "${TRAVIS_TAG}" ]; then ./gradlew -PbuildVersion=$RELEASE_VERSION packageDemo dockerPush;fi
script: skip
before_deploy:
- mkdir -p ~/bin && curl -sSL -o ~/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && chmod +x ~/bin/jq
- export PATH=$PATH:~/bin
- jq --version
- gem install bundler
- gem install rspec
- gem install github_changelog_generator
- chmod +x ./resources/github-release-script.sh
- if [ -z "${TRAVIS_TAG}" ]; then echo "Not release build - skipping changelog generation."; else ./resources/github-release-script.sh;fi
- chmod +x ./resources/generate-documentation-sitemap.sh
- if [ -z "${TRAVIS_TAG}" ]; then echo "Not release build - skipping sitemap generation."; else ./resources/generate-documentation-sitemap.sh;fi
deploy:
#############################
# MASTER BUILDS
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: "docs.inspectit.rocks"
region: eu-west-1
skip_cleanup: true
local_dir: inspectit-oce-documentation/build/asciidoc/html5
upload-dir: master
on:
tags: false
branch: master
#############################
# RELEASE BUILDS
# > Documentation
# > Sitemap
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: "docs.inspectit.rocks"
region: eu-west-1
skip_cleanup: true
local_dir: inspectit-oce-documentation/build/asciidoc/html5
upload-dir: releases/latest
on:
tags: true
branch: master
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: "docs.inspectit.rocks"
region: eu-west-1
skip_cleanup: true
local_dir: inspectit-oce-documentation/build/asciidoc/html5
upload-dir: releases/$TRAVIS_TAG
on:
tags: true
branch: master
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: "docs.inspectit.rocks"
region: eu-west-1
skip_cleanup: true
local_dir: sitemap
on:
tags: true
branch: master
# > Github Release
- provider: releases
api_key: "${GITHUB_TOKEN}"
name: "Version $RELEASE_VERSION"
file:
- "inspectit-oce-agent/build/inspectit-oce-agent-$RELEASE_VERSION.jar"
- "inspectit-oce-documentation/build/distributions/inspectit-oce-documentation-$RELEASE_VERSION.zip"
- "inspectit-oce-demo/build/inspectit-oce-demo-$RELEASE_VERSION.zip"
skip_cleanup: true
on:
tags: true
branch: master
stages:
- test
- name: deploy
if: repo = inspectIT/inspectit-oce