-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
78 lines (77 loc) · 2.41 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
dist: trusty
language: java
node_js: 12
jdk:
- oraclejdk8
- oraclejdk9
- openjdk8
- openjdk9
- openjdk10
services:
- docker
env:
global:
- DEV_BRANCH=dev
- RELEASE_BRANCH=main
- POST_RELEASE_BRANCH=main
- RELEASE_MESSAGE=release
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
npm: true
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- gradle/wrapper/
before_script:
- . ./travis/travis-functions.sh
- VERSION="$(load_version_from_file)-SNAPSHOT"
- log_env_variables
- docker-compose -version
install:
- true
script: ./gradlew install spotlessCheck jacocoTestReport coveralls -x javadoc -x integrationTest javadoc spotlessCheck
jobs:
include:
# - stage: test
# name: javadoc
# script: ./gradlew javadoc
# - stage: test
# name: spotlessCheck
# script: ./gradlew spotlessCheck
# - stage: test
# name: sonarqube
# script: ./gradlew sonarqube -x test
- name: e2e tests
script: source e2e.sh
os: linux
jdk: openjdk10
dist: focal
if: (branch = env(DEV_BRANCH) AND type = cron) OR (commit_message = e2e)
- stage: publish
name: github alpha pages
script: ./gradlew javadoc gitPublishPush
if: branch = env(DEV_BRANCH) AND type = push
- name: alpha maven
script: ./gradlew publish
if: branch = env(DEV_BRANCH) AND type = push
- stage: release
name: release maven
script: ./gradlew publish closeAndReleaseRepository -P VERSION="$(load_version_from_file)"
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- name: github release pages
script: ./gradlew javadoc gitPublishPush -P VERSION="$(load_version_from_file)"
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- stage: post release
name: tag and version upgrade
script: /bin/bash travis/travis-functions.sh post_release_version_file
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
before_install:
- |
if [ -z "${signingKeyId}" ]; then
echo "No signing the artifacts"
else
echo "Signing artifacts"
openssl aes-256-cbc -K $encrypted_98cf1ffdea51_key -iv $encrypted_98cf1ffdea51_iv -in symbol-sdk-java.gpg.enc -out symbol-sdk-java.gpg -d
fi