forked from FriedrichFroebel/cmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (66 loc) · 4.63 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
language: java
install: true
# Use Linux-based builds only.
# Supporting Windows would allow us to build `jpackage` images automatically to simplify execution
# on Windows systems, but secrets are not filtered for now.
# See https://travis-ci.community/t/current-known-issues-please-read-this-before-posting-a-new-topic/264
os: linux
dist: bionic
# Run compilation tests using the OpenJDK in version 10 and version 14 (the latest one at the time
# of writing).
# Please note that we still support Java versions starting with Java 8, but we cannot compile our
# code with Java 8 as they miss the newer APIs we reference inside the `Compatibility.java` file.
jobs:
include:
- jdk: openjdk10
- jdk: openjdk14
# The stuff to execute.
# By adding the executable bit, we ensure that we can call the Gradle wrapper script directly.
# In our case we just build the JAR file for now.
script:
- chmod +x gradlew
- ./gradlew clean
- ./gradlew verifyGoogleJavaFormat
- ./gradlew jar
# Our global environment variables used as a replacement for providing an `oc_okapi.properties`
# file.
# Created using https://github.com/mandeep/Travis-Encrypt.
env:
global:
- secure: FxN828yydlJfl/6G8EtRxJ3lWAFvMgCiRmX5OpAaV9HVU6DZ8SbkLusN7pX9KBkOsUNZOfAF/iMV9rw/+PYKpeElz0v72nJLYv5diD/wyE5hVP8n95IUzBm3X+KR+gykacsJSGKLoPl1yfNnLidvELLEbiS3KkCOenIFfaa8gqzrqkvT3vlyJhuNa3JqQoDZ81XPzwzWhM0VyXN2/2CkcnjRTWroLmtHcLjYHHW7FwzWJXxMNsTqLJKXjf2bskb+8gDvQ1bcMUETYONdRktDNxgFflp5FWINmkbSvB4U8YZkroXgWAA7RiQcx8VChvFIbWeR17/SR0WFv8YojSqmiwUiKUIuFWDoXK3HslC0TLLjLGiXiyIKCyitfcowsKPY+AgPCtNSlqOvQjohLOR+JJ+epXYxtIobQQuJqkAFZmlO6C8wCjbwZzg3YUkhy2B796sNVqAEW4IqMfhs6Aqy60zez+ovCqmA0fhh516e7SmN3dR1vgxw4WTVm/btXZNy7ff9TqbXCX8h1UPN/AF2g6YsiG+usTANgBTTMead18A5pmx/5gUKH+eiTdrWnbQFzNUz8K3eATAfUwxcUxkHrWI7NaqMbrgLNkvdHZicavqzpO3Koh7aiyIt8+5QCMdyq/ff/YZZUOEqiPLpAu2vVfYtXBv1CZH3RgOMK6N0ilY=
- secure: oUXfX0n6K3IuxPqMVCaFHFCESf9mpZLSzi1bn+h6GxP0ItmxH9f923gNqV2FT8OVQJlel09X4ssHKrUn11hUcWOwP/LRqgQ8u0wziE+gqWaE7NbbLSSkrFrL00BZHcnzulLO9Nk6b7H9KNuAssO+EuQXLL5yM+y4ICA+c60Ey1FH5aHMNE0107nV0oGXwasCdcGq4nOOUqy8Z7YQgJVkftlX0P2hOOg+52cWXqF7kb7PmYr7aHJ9tDfFLCPabje+SizgCHqIuqmRbEp2ATbeLPDn/JFVJBwB/bTUXd9lC+EToNKahKP+HwKxszpc7M19Ny2UVtywONJXxb5ifK4fyWSLKjO7g2pW25hr8jIBlYCQ2hJhCMmWXsPD0EkbgHKQmhesb+H92uUewsxvRlZR/DN1DAGblwp7yVIXwwMTgslj9tC2rRALEHfPPtMZRnNgPd0QhXSOopfN1aGjpYMgxf/xIB0oslxAN/IqS44K8HU97hyc8sXaGkIDBtoHeAC+xfd3DIklFASrm7KGpRTgthzIeQu9DRCqVJC9/0dLMX8aQm6Y7MasaD+5cpUMXiQK4QVvLA2dlqz3W6K99feavdTOa87d4Oj+gsfCSxsYETxRISFdDZ1X/9y7SqBg8B22GmokQokngqzDeDtOlTn40rYDLFditTe/FbQIhCwBDaQ=
- SHORT_HASH="$(git rev-parse --short HEAD)"
# See https://guides.gradle.org/executing-gradle-builds-on-travisci/#enable_caching_of_downloaded_artifacts.
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/
# Deploy the JAR file as a GitHub release for every change on the master branch.
# We mark this as a pre-release as the current master is usually providing the development
# version.
# We already use the new deployment API here, see https://docs.travis-ci.com/user/deployment-v2.
# TODO: This is not optimal at the moment, as this will not replace the existing release.
# Ideally we would have a dedicated `prelease` tag pointing to the latest master
# commit and one release which gets updated accordingly.
deploy:
provider: releases
token:
secure: otUfUaVFFFEkKDXPzclAC/UxzwwbuGMAndBiKBanCQ9TmvNKm51hvHc8Xpz+a7Z5FBr1wECvkhXWwvAlTPNHiuBOCD0tHNQR67DiQ7q1OGO0DYt4rKrMWXUKpTxndRYCDWcujdbV7H240nKff/rwXviIugSFZu2KsNAEnDsSg6vve2C9Isf1bUIbZ9VftI1T0f1JFhHEixj9JHpotC4lIOKYxG4M09tJ0rZzuyMZNfAo7/38asmAMzLRke4l52EH6MZ5MMYqZF0XEB6uZINfezQgJ8jWnVsU+v8Vxt5xW1nVNTIIMQuJSKsWrag89ua8BfnO47XGKS/xRQQfwMTWAzy+t2tiOynm6JJJiyArgR1X3In9n5I8fHIGewt5SOmREvR153xBtMe0i2dAvw7A6mD6oRemiGHV24iXK1TcqSenZXBSsqNtirdPWNUyeS7kxRxbKm+a2DARxE5iBl/Es9dGaALMH2z3TU7ECLPDmE7k9/Wyo+3IDUDCuTKOTa6MeewdpJ9q/iZJdCAM9ssaD0WH79UnXwCr9IcuHCFCX44ALTSune3NfNC8UfsGF3BfBEFCAEzZxjpx+5ndj52f4cEdWDcXqjU0ePgDRWOzS9dA180eNJgARzwF73q5WxDDiANfuwlnIi8/KHNRXjeIxrF2kjwa9j+XAIa0We3bDEE=
file: '$HOME/build/cm-$SHORT_HASH.jar'
cleanup: false
on:
tags: false
jdk: openjdk14
prerelease: true
overwrite: true
tag_name: 'prerelease'
name: 'Development build'
release_notes: "Automated build of the master branch (commit $TRAVIS_COMMIT) using Travis CI on $(date +'%F %T %Z')."
edge: true
# Rename the JAR file before deploying it.
# This will add the short commit hash to the filename to be able to determine the used commit.
before_deploy:
- cp $TRAVIS_BUILD_DIR/build/libs/cm-ci.jar $HOME/build/cm-$SHORT_HASH.jar