Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit 81670cf

Browse files
authored
chore: migrate to owlbot (#718)
1 parent 8130701 commit 81670cf

File tree

9 files changed

+96
-70
lines changed

9 files changed

+96
-70
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
docker:
2+
digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75
3+
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest

.github/.OwlBot.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
docker:
16+
image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest"
17+
18+
deep-remove-regex:
19+
- "/grpc-google-.*/src"
20+
- "/proto-google-.*/src"
21+
- "/google-.*/src"
22+
23+
deep-preserve-regex:
24+
- "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java"
25+
- "/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/v3/ITVPCServiceControlTest.java"
26+
- "/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/AlertPolicyConditionName.java"
27+
- "/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabelsOuterClass.java"
28+
- "/proto-google-cloud-monitoring-v3/src/main/java/google/monitoring/v3/DroppedLabelsOuterClass.java"
29+
30+
31+
deep-copy-regex:
32+
- source: "/google/monitoring/(v.*)/.*-java/proto-google-.*/src"
33+
dest: "/owl-bot-staging/$1/proto-google-cloud-monitoring-$1/src"
34+
- source: "/google/monitoring/(v.*)/.*-java/grpc-google-.*/src"
35+
dest: "/owl-bot-staging/$1/grpc-google-cloud-monitoring-$1/src"
36+
- source: "/google/monitoring/(v.*)/.*-java/gapic-google-.*/src"
37+
dest: "/owl-bot-staging/$1/google-cloud-monitoring/src"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>libraries-bom</artifactId>
22-
<version>23.0.0</version>
22+
<version>24.0.0</version>
2323
<type>pom</type>
2424
<scope>import</scope>
2525
</dependency>
@@ -42,28 +42,28 @@ If you are using Maven without BOM, add this to your dependencies:
4242
<dependency>
4343
<groupId>com.google.cloud</groupId>
4444
<artifactId>google-cloud-monitoring</artifactId>
45-
<version>3.0.5-SNAPSHOT</version>
45+
<version>3.1.1-SNAPSHOT</version>
4646
</dependency>
4747

4848
```
4949

5050
If you are using Gradle 5.x or later, add this to your dependencies
5151

5252
```Groovy
53-
implementation platform('com.google.cloud:libraries-bom:23.1.0')
53+
implementation platform('com.google.cloud:libraries-bom:24.0.0')
5454
5555
implementation 'com.google.cloud:google-cloud-monitoring'
5656
```
5757
If you are using Gradle without BOM, add this to your dependencies
5858

5959
```Groovy
60-
implementation 'com.google.cloud:google-cloud-monitoring:3.0.7'
60+
implementation 'com.google.cloud:google-cloud-monitoring:3.1.0'
6161
```
6262

6363
If you are using SBT, add this to your dependencies
6464

6565
```Scala
66-
libraryDependencies += "com.google.cloud" % "google-cloud-monitoring" % "3.0.7"
66+
libraryDependencies += "com.google.cloud" % "google-cloud-monitoring" % "3.1.0"
6767
```
6868

6969
## Authentication
@@ -215,7 +215,7 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]
215215
Java is a registered trademark of Oracle and/or its affiliates.
216216

217217
[product-docs]: https://cloud.google.com/monitoring/docs
218-
[javadocs]: https://googleapis.dev/java/google-cloud-monitoring/latest/
218+
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/history
219219
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-monitoring/java7.svg
220220
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-monitoring/java7.html
221221
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-monitoring/java8.svg

google-cloud-monitoring-bom/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0"?>
1+
<?xml version='1.0' encoding='UTF-8'?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.google.cloud</groupId>
@@ -49,7 +49,6 @@
4949

5050
<dependencyManagement>
5151
<dependencies>
52-
5352
<dependency>
5453
<groupId>com.google.cloud</groupId>
5554
<artifactId>google-cloud-monitoring</artifactId>
@@ -79,4 +78,4 @@
7978
</plugin>
8079
</plugins>
8180
</build>
82-
</project>
81+
</project>

google-cloud-monitoring/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0"?>
1+
<?xml version='1.0' encoding='UTF-8'?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.google.cloud</groupId>

owlbot.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import synthtool as s
16+
from synthtool.languages import java
17+
18+
def fix_resource(client, version, name):
19+
s.replace(
20+
[f'owl-bot-staging/{version}/google-cloud-monitoring/**/{version}/{client}.java'],
21+
f'import com.google.monitoring.{version}.{name}',
22+
'import com.google.api.resourcenames.ResourceName',
23+
)
24+
25+
s.replace(
26+
[f'owl-bot-staging/{version}/google-cloud-monitoring/**/{version}/{client}.java'],
27+
name,
28+
'ResourceName',
29+
)
30+
version='v3'
31+
for library in s.get_staging_dirs():
32+
# put any special-case replacements here
33+
fix_resource('AlertPolicyServiceClient', version, 'FolderName')
34+
fix_resource('GroupServiceClient', version, 'FolderName')
35+
fix_resource('MetricServiceClient', version, 'FolderName')
36+
fix_resource('NotificationChannelServiceClient', version, 'FolderName')
37+
fix_resource('ServiceMonitoringServiceClient', version, 'FolderName')
38+
fix_resource('UptimeCheckServiceClient', version, 'FolderName')
39+
40+
s.move(library)
41+
42+
s.remove_staging_dirs()
43+
java.common_templates()

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@
109109
</build>
110110

111111
<modules>
112-
<module>proto-google-cloud-monitoring-v3</module>
113-
<module>grpc-google-cloud-monitoring-v3</module>
114112
<module>google-cloud-monitoring</module>
113+
<module>grpc-google-cloud-monitoring-v3</module>
114+
<module>proto-google-cloud-monitoring-v3</module>
115115
<module>google-cloud-monitoring-bom</module>
116116
</modules>
117117

synth.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Format:
22
# module:released-version:current-version
33

4-
proto-google-cloud-monitoring-v3:3.1.0:3.1.1-SNAPSHOT
4+
google-cloud-monitoring:3.1.0:3.1.1-SNAPSHOT
55
grpc-google-cloud-monitoring-v3:3.1.0:3.1.1-SNAPSHOT
6-
google-cloud-monitoring:3.1.0:3.1.1-SNAPSHOT
6+
proto-google-cloud-monitoring-v3:3.1.0:3.1.1-SNAPSHOT

0 commit comments

Comments
 (0)