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
This commit is contained in:
Lai Jiang 2019-06-14 01:00:48 -04:00
parent 342bfc9dc5
commit a1d3f7be8b
3 changed files with 29 additions and 4 deletions

View file

@ -25,7 +25,6 @@
# usage (usually just wrapping it in single quotes should suffice). # usage (usually just wrapping it in single quotes should suffice).
language: java language: java
install: true
jdk: jdk:
# Our builds fail against Oracle Java for reasons yet unknown. # Our builds fail against Oracle Java for reasons yet unknown.
- openjdk8 - openjdk8
@ -39,15 +38,35 @@ cache:
directories: directories:
- $HOME/.gradle/caches/ - $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/ - $HOME/.gradle/wrapper/
- $HOME/google-cloud-sdk/
# WebDriver tests need Chrome and ChromeDriver provisioned by the docker image # WebDriver tests need Chrome and ChromeDriver provisioned by the docker image
services: services:
- docker - docker
env: env:
global:
# Disable fancy status information (looks bad on travis and exceeds logfile # Disable fancy status information (looks bad on travis and exceeds logfile
# quota) # quota)
TERM=dumb - 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 # Specialize gradle build to use an up-to-date gradle and the /gradle
# directory. # directory.

View file

@ -677,3 +677,7 @@ createUberJar('nomulus', 'nomulus', 'google.registry.tools.RegistryTool')
createUberJar('gtechTool', 'gtech_tool', 'google.registry.tools.GtechTool') createUberJar('gtechTool', 'gtech_tool', 'google.registry.tools.GtechTool')
project.nomulus.dependsOn project(':third_party').jar project.nomulus.dependsOn project(':third_party').jar
project.gtechTool.dependsOn project(':third_party').jar project.gtechTool.dependsOn project(':third_party').jar
project.build.dependsOn nomulus
project.build.dependsOn gtechTool
project.build.dependsOn ':stage'

View file

@ -11,6 +11,8 @@ sourceSets {
createUberJar('deployJar', 'proxy_server', 'google.registry.proxy.ProxyServer') createUberJar('deployJar', 'proxy_server', 'google.registry.proxy.ProxyServer')
project.build.dependsOn deployJar
dependencies { dependencies {
def deps = rootProject.dependencyMap def deps = rootProject.dependencyMap