1
0
mirror of https://github.com/google/nomulus synced 2026-01-07 22:15:30 +00:00
Files
nomulus/.travis.yml
Lai Jiang c56432ea09 Add tasks used in release as dependencies of the build task
Our CI (Travis & Kokoro) runs "gradle build", so we need to make
sure that all tasks used in the release process are called during
the build so that breakage can be caught earlier.

In order to stage the GAE folder we need gcloud to be present.
Therefore the Travis config is changed to install gcloud.

See: https://gist.github.com/mjackson/5887963e7d8b8fb0615416c510ae8857
2019-06-19 18:46:46 -04:00

78 lines
3.2 KiB
YAML

# 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 destination can be any GCS path (e.g. "gcs://bucket-name/path").
# 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
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/
- $HOME/google-cloud-sdk/
# WebDriver tests need Chrome and ChromeDriver provisioned by the docker image
services:
- docker
env:
global:
# Disable fancy status information (looks bad on travis and exceeds logfile
# quota)
- TERM=dumb
# Do not prompt for user input when using any SDK methods.
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
install:
- |
if [ ! -d $HOME/google-cloud-sdk/bin ]
then
# The install script errors if this directory already exists,
# but Travis already creates it when we mark it as cached.
rm -rf $HOME/google-cloud-sdk
# The install script is overly verbose, which sometimes causes
# problems on Travis, so ignore stdout.
curl https://sdk.cloud.google.com | bash
fi
# This line is critical. We setup the SDK to take precedence in our
# environment over the old SDK that is already on the machine.
- source $HOME/google-cloud-sdk/path.bash.inc
- gcloud components install app-engine-java
- gcloud version
# 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: echo "$CREDZ" >credz.json && chmod 755 ./gradlew && travis_wait 45 ./gradlew build --continue -P uploaderDestination="$REPORT_GCS_DESTINATION" -P uploaderCredentialsFile=credz.json -P uploaderMultithreadedUpload=yes -P mavenUrl=https://storage.googleapis.com/domain-registry-maven-repository/maven -P pluginsUrl=https://storage.googleapis.com/domain-registry-maven-repository/plugins