Skip to content

Commit 3c91a65

Browse files
suztomochingor13
authored andcommitted
Add Linkage Monitor presubmit check (#719)
* Linkage Monitor * 2019 * empty commit to trigger Kokoro * 755 permission
1 parent 173a814 commit 3c91a65

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.kokoro/linkage-monitor.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
# Copyright 2019 Google Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
cd github/google-http-java-client/
19+
20+
# Print out Java
21+
java -version
22+
echo $JOB_TYPE
23+
24+
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
25+
26+
# Installs snapshot artifacts locally. Linkage Monitor uses them.
27+
mvn install -DskipTests=true -B -V
28+
29+
# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR
30+
JAR=linkage-monitor-latest-all-deps.jar
31+
curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}"
32+
33+
# Fails if there's new linkage errors compared with baseline
34+
java -jar $JAR com.google.cloud:libraries-bom

.kokoro/presubmit/linkage-monitor.cfg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Linkage Monitor notifies new linkage errors as Kokoro presubmit check
4+
# https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/linkage-monitor
5+
6+
# Configure the docker image for kokoro-trampoline.
7+
env_vars: {
8+
key: "TRAMPOLINE_IMAGE"
9+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
10+
}
11+
12+
env_vars: {
13+
key: "TRAMPOLINE_BUILD_FILE"
14+
value: "github/google-http-java-client/.kokoro/linkage-monitor.sh"
15+
}

0 commit comments

Comments
 (0)