Skip to content

Commit 47ddb22

Browse files
authored
---
yaml --- r: 29509 b: refs/heads/autosynth-monitoring c: cd4d635 h: refs/heads/master i: 29507: 024742f
1 parent 4949d33 commit 47ddb22

3 files changed

Lines changed: 86 additions & 1 deletion

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ refs/tags/v0.66.0: ed6a3f57cbdaa20339a1995f7d7d53b172a5b8ef
113113
refs/tags/v0.67.0: 30b56f02092efc6f3c3667650ea8b8825003e0b7
114114
refs/heads/autosynth-compute: c0ad4e5b54b2b167d47e508ca215c039404837d3
115115
refs/heads/autosynth-container: e9a9a8564756e20770320ed54eafa867040a7690
116-
refs/heads/autosynth-monitoring: d931fac64e331bbcffea7ff9dbd271e31bac5e05
116+
refs/heads/autosynth-monitoring: cd4d6359d131b1d23af2045d0c5d1c3f8cd7a8f2
117117
refs/heads/autosynth-pubsub: 8aac5a6202d83e8d67f5cb1d58f0adf9f2622aeb
118118
refs/heads/autosynth-video-intelligence: 82b145665822830c46d47eb8925edb2d842d6815
119119
refs/heads/autosynth-vision: 01ef61bcef344ceee0198f56f18bc1db20201261
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
env_vars: {
3+
key: "STAGING_BUCKET"
4+
value: "docs_staging"
5+
}
6+
7+
env_vars: {
8+
key: "TRAMPOLINE_BUILD_FILE"
9+
value: "github/google-cloud-java/.kokoro/release/publish_javadoc.sh"
10+
}
11+
12+
before_action {
13+
fetch_keystore {
14+
keystore_resource {
15+
keystore_config_id: 73713
16+
keyname: "docuploader_service_account"
17+
}
18+
}
19+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
if [[ -z "${CREDENTIALS}" ]]; then
19+
CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713-docuploader_service_account
20+
fi
21+
22+
if [[ -z "${STAGING_BUCKET}" ]]; then
23+
echo "Need to set STAGING_BUCKET 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 -DskipTests=true
35+
36+
build_and_publish_site() {
37+
DIRECTORY=$1
38+
NAME=$1
39+
VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)
40+
41+
pushd ${DIRECTORY}
42+
43+
# build the docs
44+
mvn site
45+
mvn site:stage -DtopSiteURL=https://googleapis.dev/java/${NAME}/${VERSION}
46+
47+
pushd target/staging/site/${NAME}/apidocs
48+
49+
# create metadata
50+
python3 -m docuploader create-metadata \
51+
--name ${NAME} \
52+
--version ${VERSION} \
53+
--language java
54+
55+
# upload docs
56+
python3 -m docuploader upload . \
57+
--credentials ${CREDENTIALS} \
58+
--staging-bucket ${STAGING_BUCKET}
59+
60+
popd
61+
popd
62+
}
63+
64+
# TODO (chingor): split all the artifacts
65+
build_and_publish_site google-api-grpc
66+
build_and_publish_site google-cloud-clients

0 commit comments

Comments
 (0)