forked from google/nomulus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (53 loc) · 2.25 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
# Copyright 2018 The Nomulus Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Collecting report files from a travis build to GCS requires setting the
# "CREDZ" and "REPORT_GCS_BUCKET" environment variables in your travis
# repository.
#
# The report bucket id should just be the bucket id without any scheme or path
# (e.g. "my-bucket-name", not "gcs://my-bucket-name"). You'll want to select
# "Display value in build log", otherwise travis will hide the bucket name in
# the URL that is displayed.
#
# The CREDZ variable should be the contents of a json credentials file for
# a service account with write access to the bucket, escaped for bash shell
# usage (usually just wrapping it in single quotes should suffice).
language: java
install: true
jdk:
# Our builds fail against Oracle Java for reasons yet unknown.
- openjdk8
# Caching options suggested by a random article.
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -f $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Get Chrome binary for WebDriver tests
addons:
chrome: stable
env:
# Disable fancy status information (looks bad on travis and exceeds logfile
# quota)
TERM=dumb
# Specialize gradle build to use an up-to-date gradle and the /gradle
# directory.
# The "travis_wait 45" lets our build spend up to 45 minutes without writing
# output, instead of the default 10.
# See notes on the CREDZ and REPORT_GCS_BUCKET environment variable in the
# comments at the top of the file.
script: cd gradle && echo "$CREDZ" >credz.json && chmod 755 ./gradlew && travis_wait 45 ./gradlew build -P gcsBucket="$REPORT_GCS_BUCKET" -P gcsCredentialsFile=credz.json -P gcsMultithreadedUpload=yes