Skip to content

Commit

Permalink
Add Linkage Monitor presubmit check (#719)
Browse files Browse the repository at this point in the history
* Linkage Monitor

* 2019

* empty commit to trigger Kokoro

* 755 permission
  • Loading branch information
suztomo authored and chingor13 committed Jun 14, 2019
1 parent 173a814 commit 3c91a65
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .kokoro/linkage-monitor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# Copyright 2019 Google Inc.
#
# 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.

set -eo pipefail

cd github/google-http-java-client/

# Print out Java
java -version
echo $JOB_TYPE

export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"

# Installs snapshot artifacts locally. Linkage Monitor uses them.
mvn install -DskipTests=true -B -V

# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR
JAR=linkage-monitor-latest-all-deps.jar
curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}"

# Fails if there's new linkage errors compared with baseline
java -jar $JAR com.google.cloud:libraries-bom
15 changes: 15 additions & 0 deletions .kokoro/presubmit/linkage-monitor.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Linkage Monitor notifies new linkage errors as Kokoro presubmit check
# https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/linkage-monitor

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-http-java-client/.kokoro/linkage-monitor.sh"
}

0 comments on commit 3c91a65

Please sign in to comment.