Skip to content

Commit 7eccff1

Browse files
build(java): run linkage monitor as GitHub action build: migrate to flakybot chore: update cloud-rad buckets (#574)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/9dfb129c-4122-4560-83af-5a01ba16cbc9/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@b416a7b Source-Link: googleapis/synthtool@f327d3b Source-Link: googleapis/synthtool@2414b81 Source-Link: googleapis/synthtool@692715c Source-Link: googleapis/synthtool@140ba24 Source-Link: googleapis/synthtool@e935c9e Source-Link: googleapis/synthtool@5de29e9 Source-Link: googleapis/synthtool@d1bb917
1 parent 91df992 commit 7eccff1

File tree

8 files changed

+101
-61
lines changed

8 files changed

+101
-61
lines changed

.github/workflows/auto-release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: auto-release
44
jobs:
55
approve:
66
runs-on: ubuntu-latest
7-
if: contains(github.head_ref, 'release-v')
7+
if: contains(github.head_ref, 'release-please')
88
steps:
99
- uses: actions/github-script@v3
1010
with:
@@ -16,8 +16,8 @@ jobs:
1616
return;
1717
}
1818
19-
// only approve PRs like "chore: release <release version>"
20-
if ( !context.payload.pull_request.title.startsWith("chore: release") ) {
19+
// only approve PRs like "chore(master): release <release version>"
20+
if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) {
2121
return;
2222
}
2323

.github/workflows/ci.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ jobs:
5454
with:
5555
java-version: 8
5656
- run: java -version
57-
- run: .kokoro/linkage-monitor.sh
57+
- name: Install artifacts to local Maven repository
58+
run: .kokoro/build.sh
59+
shell: bash
60+
- name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release)
61+
uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor
5862
lint:
5963
runs-on: ubuntu-latest
6064
steps:

.kokoro/linkage-monitor.sh

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

.kokoro/release/publish_javadoc.cfg

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ env_vars: {
77
value: "docs-staging"
88
}
99

10+
# cloud-rad staging
1011
env_vars: {
1112
key: "STAGING_BUCKET_V2"
12-
value: "docs-staging-v2"
13-
# Production will be at: docs-staging-v2
13+
value: "docs-staging-v2-staging"
1414
}
1515

1616
env_vars: {
@@ -26,7 +26,4 @@ before_action {
2626
keyname: "docuploader_service_account"
2727
}
2828
}
29-
}
30-
31-
# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/<doclet name>
32-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx"
29+
}

.kokoro/release/publish_javadoc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ python3 -m docuploader create-metadata \
7171
--version ${VERSION} \
7272
--language java
7373

74-
# upload docs
74+
# upload docs to staging bucket
7575
python3 -m docuploader upload . \
7676
--credentials ${CREDENTIALS} \
7777
--staging-bucket ${STAGING_BUCKET_V2}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# cloud-rad production
4+
env_vars: {
5+
key: "STAGING_BUCKET_V2"
6+
value: "docs-staging-v2"
7+
}
8+
9+
# Configure the docker image for kokoro-trampoline
10+
env_vars: {
11+
key: "TRAMPOLINE_IMAGE"
12+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
13+
}
14+
15+
env_vars: {
16+
key: "TRAMPOLINE_BUILD_FILE"
17+
value: "github/google-auth-library-java/.kokoro/release/publish_javadoc11.sh"
18+
}
19+
20+
before_action {
21+
fetch_keystore {
22+
keystore_resource {
23+
keystore_config_id: 73713
24+
keyname: "docuploader_service_account"
25+
}
26+
}
27+
}
28+
29+
# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/<doclet name>
30+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
# Copyright 2021 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+
if [[ -z "${CREDENTIALS}" ]]; then
19+
CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account
20+
fi
21+
22+
if [[ -z "${STAGING_BUCKET_V2}" ]]; then
23+
echo "Need to set STAGING_BUCKET_V2 environment variable"
24+
exit 1
25+
fi
26+
27+
# work from the git root directory
28+
pushd $(dirname "$0")/../../
29+
30+
# install docuploader package
31+
python3 -m pip install gcp-docuploader
32+
33+
# compile all packages
34+
mvn clean install -B -q -DskipTests=true
35+
36+
export NAME=google-auth-library
37+
export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)
38+
39+
# V3 generates docfx yml from javadoc
40+
# generate yml
41+
mvn clean site -B -q -P docFX
42+
43+
pushd target/docfx-yml
44+
45+
# create metadata
46+
python3 -m docuploader create-metadata \
47+
--name ${NAME} \
48+
--version ${VERSION} \
49+
--language java
50+
51+
# upload yml to production bucket
52+
python3 -m docuploader upload . \
53+
--credentials ${CREDENTIALS} \
54+
--staging-bucket ${STAGING_BUCKET_V2} \
55+
--destination-prefix docfx-

synth.metadata

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/google-auth-library-java.git",
7-
"sha": "427963e04702d8b73eca5ed555539b11bbe97342"
7+
"sha": "91df992970a2146790637cc8f34dec7936d16617"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "3816b080296d4d52975079fd26c110dd26ba25af"
14+
"sha": "b416a7befcdbc42de41cf387dcf428f894fb812b"
1515
}
1616
}
1717
],
@@ -38,7 +38,6 @@
3838
".kokoro/continuous/java8.cfg",
3939
".kokoro/continuous/readme.cfg",
4040
".kokoro/dependencies.sh",
41-
".kokoro/linkage-monitor.sh",
4241
".kokoro/nightly/common.cfg",
4342
".kokoro/nightly/integration.cfg",
4443
".kokoro/nightly/java11.cfg",
@@ -70,14 +69,15 @@
7069
".kokoro/release/promote.sh",
7170
".kokoro/release/publish_javadoc.cfg",
7271
".kokoro/release/publish_javadoc.sh",
72+
".kokoro/release/publish_javadoc11.cfg",
73+
".kokoro/release/publish_javadoc11.sh",
7374
".kokoro/release/snapshot.cfg",
7475
".kokoro/release/snapshot.sh",
7576
".kokoro/release/stage.cfg",
7677
".kokoro/release/stage.sh",
7778
".kokoro/trampoline.sh",
7879
"CODE_OF_CONDUCT.md",
7980
"CONTRIBUTING.md",
80-
"LICENSE",
8181
"codecov.yaml"
8282
]
8383
}

0 commit comments

Comments
 (0)