forked from Backblaze/b2-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
75 lines (57 loc) · 1.85 KB
/
.travis.yml
File metadata and controls
75 lines (57 loc) · 1.85 KB
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
# Copyright 2017, Backblaze Inc. All Rights Reserved.
# License https://www.backblaze.com/using_b2_code.html
# travis-ci is about to change the default to 'trusty', so let's
# switch to it on purpose. we can probably remove in August 2017.
# see https://blog.travis-ci.com/2017-07-11-trusty-as-default-linux-is-coming
dist: trusty
language: java
jdk:
- oraclejdk8
env:
global:
- OUTPUT_DIR=build/outputs
- OUTPUT_ZIP=b2-sdk-build-${TRAVIS_BUILD_NUMBER}.zip
before_install:
- mkdir -p ~/.gradle && echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties
- sudo pip install b2
script:
#
# actually build
#
- ./gradlew build javadoc writeNewPom
#
# Prepare the outputs
#
# make the directory
- mkdir -p build/outputs
# copy the generated jar files & pom files
- cp -v */build/libs/b2-sdk-*.{jar,pom} build/outputs
# find the jar's version.
- VERSION=$(head -1 core/build/resources/main/b2-sdk-core/version.txt | awk "-F'" '{print $1}')
- echo VERSION=$VERSION
# zip up the outputs
- echo OUTPUT_ZIP=$OUTPUT_ZIP
- (cd $OUTPUT_DIR; zip -r $TRAVIS_BUILD_DIR/build/$OUTPUT_ZIP *)
#
# upload to b2 (if credentials are provided, as they will be for backblaze's builds, but not pull requests)
#
- ./maybe_upload_build_results $OUTPUT_ZIP
## list all files to help debug stuff!
#- find $TRAVIS_BUILD_DIR
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/
# note that i'm only uploading the javadocs for b2-sdk-core.
# that's because i'm lame and building separate javadocs for
# each jar and only uploading one set of javadocs.
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: core/build/docs/javadoc
on:
branch: master