Skip to content

Commit d97d609

Browse files
chore: update auto-release script to fix breaking changes in v5 (#1350) (#1575)
Source-Link: googleapis/synthtool@53a58c2 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent f794801 commit d97d609

File tree

6 files changed

+104
-7
lines changed

6 files changed

+104
-7
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
16-
digest: sha256:7062473f423f339256346ddbee3d81fb1de6b784fabc2a4d959d7df2c720e375
16+
digest: sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b

.github/workflows/approve-readme.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright 2022 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+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
116
on:
217
pull_request:
318
name: auto-merge-readme

.github/workflows/auto-release.yaml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright 2022 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+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
116
on:
217
pull_request:
318
name: auto-release
@@ -16,13 +31,13 @@ jobs:
1631
return;
1732
}
1833
19-
// only approve PRs like "chore: release <release version>"
20-
if ( !context.payload.pull_request.title.startsWith("chore: release") ) {
34+
// only approve PRs like "chore(main): release <release version>"
35+
if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) {
2136
return;
2237
}
2338
2439
// only approve PRs with pom.xml and versions.txt changes
25-
const filesPromise = github.pulls.listFiles.endpoint({
40+
const filesPromise = github.rest.pulls.listFiles.endpoint({
2641
owner: context.repo.owner,
2742
repo: context.repo.repo,
2843
pull_number: context.payload.pull_request.number,
@@ -54,7 +69,7 @@ jobs:
5469
return;
5570
}
5671
57-
const promise = github.pulls.list.endpoint({
72+
const promise = github.rest.pulls.list.endpoint({
5873
owner: context.repo.owner,
5974
repo: context.repo.repo,
6075
state: 'open'
@@ -71,7 +86,7 @@ jobs:
7186
}
7287
7388
// approve release PR
74-
await github.pulls.createReview({
89+
await github.rest.pulls.createReview({
7590
owner: context.repo.owner,
7691
repo: context.repo.repo,
7792
body: 'Rubber stamped release!',
@@ -80,7 +95,7 @@ jobs:
8095
});
8196
8297
// attach kokoro:force-run and automerge labels
83-
await github.issues.addLabels({
98+
await github.rest.issues.addLabels({
8499
owner: context.repo.owner,
85100
repo: context.repo.repo,
86101
issue_number: context.payload.pull_request.number,

.github/workflows/ci.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright 2022 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+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
116
on:
217
push:
318
branches:

.kokoro/build.bat

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
:: See documentation in type-shell-output.bat
2+
# Copyright 2022 Google LLC
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+
# Github action job to test core java library features on
16+
# downstream client libraries before they are released.
217

318
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-public-resources/java11014"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "integration"
12+
}
13+
# TODO: remove this after we've migrated all tests and scripts
14+
env_vars: {
15+
key: "GCLOUD_PROJECT"
16+
value: "gcloud-devel"
17+
}
18+
19+
env_vars: {
20+
key: "GOOGLE_CLOUD_PROJECT"
21+
value: "gcloud-devel"
22+
}
23+
24+
env_vars: {
25+
key: "ENABLE_FLAKYBOT"
26+
value: "true"
27+
}
28+
29+
env_vars: {
30+
key: "GOOGLE_APPLICATION_CREDENTIALS"
31+
value: "secret_manager/java-it-service-account"
32+
}
33+
34+
env_vars: {
35+
key: "SECRET_MANAGER_KEYS"
36+
value: "java-it-service-account"
37+
}

0 commit comments

Comments
 (0)