chore: linkage monitor GitHub Actions for Java repository template#933
Conversation
| retry_with_backoff 3 10 \ | ||
| mvn install -B -V \ | ||
| -DskipTests=true \ | ||
| -Dclirr.skip=true \ | ||
| -Denforcer.skip=true \ | ||
| -Dmaven.javadoc.skip=true \ | ||
| -Dgcloud.download.skip=true |
There was a problem hiding this comment.
This command is now part of ci.yaml
| # 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 |
There was a problem hiding this comment.
These commands are done at the new action specified at GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor. GoogleCloudPlatform/cloud-opensource-java@a7f4d63#diff-83a64340a0cc2b591f154efe6cc2f4928d0391788f54d76966bde9b7cb12d36cR10 (See the curl command downloads the versioned uber JAR)
|
@Neenu1995 I see you got assigned to this. Let me know if you need any clarification. |
chingor13
left a comment
There was a problem hiding this comment.
Can you send a PR to any one of the libraries to test it out? Then we'll merge this one if it passes.
Oh I see it was done in spanner. |
|
Thank you. |
@stephaniewang526 @chingor13
This PR migrates the Java library repositories to use the versioned action through cloud-opensource-java repository. Previously the Linkage Monitor was not versioned and caused unexpected problem in past (GoogleCloudPlatform/cloud-opensource-java#1838). To have proper versioning of the tool, we have prepared a versioned Linkage Monitor through
GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor.As we no longer need
curlto download the uber JAR, we don't needlinkage-monitor.sh, I put the Maven install command in ci.yaml.Details of the background: go/jdd-github-actions.
CC: @elharo
What is Linkage Monitor
Linkage Monitor works as a presubmit check in a GitHub repository to prevent open source libraries in the Google Cloud Java orbit (GAX, google-http-java-client, gRPC, etc.) from releasing versions that would introduce new linkage errors.
More on https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/Linkage-Monitor
What did I test?
I tested this yaml file in java-spanner and it worked.
https://github.com/googleapis/java-spanner/pull/831/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133ddR57