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

Commit 85da17c

Browse files
chore: regen common template
* build(java): generate docfx yml on release * feat: generate docfx yml on release * fix: updates name variable * fix: remove non needed resource * fix: update date Source-Author: Emily Ball <[email protected]> Source-Date: Mon Feb 1 15:24:59 2021 -0800 Source-Repo: googleapis/synthtool Source-Sha: 5de29e9434b63ea6d7e46dc348521c62969af1a1 Source-Link: googleapis/synthtool@5de29e9 * build(java): run linkage monitor as GitHub action Source-Author: Tomo Suzuki <[email protected]> Source-Date: Tue Feb 2 16:20:26 2021 -0500 Source-Repo: googleapis/synthtool Source-Sha: e935c9ecb47da0f2e054f5f1845f7cf7c95fa625 Source-Link: googleapis/synthtool@e935c9e
1 parent 9d5061e commit 85da17c

File tree

6 files changed

+102
-55
lines changed

6 files changed

+102
-55
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,18 @@ 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: |
59+
source .kokoro/common.sh
60+
retry_with_backoff 3 10 \
61+
mvn install -B -V \
62+
-Dmaven.test.skip -DskipTests=true \
63+
-Dclirr.skip=true \
64+
-Denforcer.skip=true \
65+
-Dmaven.javadoc.skip=true \
66+
-Dgcloud.download.skip=true
67+
shell: bash
68+
- uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor
5869
lint:
5970
runs-on: ubuntu-latest
6071
steps:

.kokoro/linkage-monitor.sh

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

.kokoro/release/publish_javadoc.cfg

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
}
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+
env_vars: {
4+
key: "STAGING_BUCKET_V2"
5+
value: "docs-staging-v2"
6+
# Production will be at: 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/java-memcache/.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-cloud-shared-dependencies
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
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/java-shared-dependencies.git",
7-
"sha": "1c0b7bd60b3d73c16cc6c19ab90d8ccedece3706"
7+
"sha": "9d5061e27d044cba1884065efbdc87bcbbf0440f"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "d1bb9173100f62c0cfc8f3138b62241e7f47ca6a"
14+
"sha": "e935c9ecb47da0f2e054f5f1845f7cf7c95fa625"
1515
}
1616
}
1717
],
@@ -27,7 +27,6 @@
2727
".github/snippet-bot.yml",
2828
".github/trusted-contribution.yml",
2929
".github/workflows/approve-readme.yaml",
30-
".github/workflows/auto-release.yaml",
3130
".github/workflows/ci.yaml",
3231
".kokoro/build.bat",
3332
".kokoro/build.sh",
@@ -38,7 +37,6 @@
3837
".kokoro/continuous/java8.cfg",
3938
".kokoro/continuous/readme.cfg",
4039
".kokoro/dependencies.sh",
41-
".kokoro/linkage-monitor.sh",
4240
".kokoro/nightly/common.cfg",
4341
".kokoro/nightly/integration.cfg",
4442
".kokoro/nightly/java11.cfg",
@@ -70,6 +68,8 @@
7068
".kokoro/release/promote.sh",
7169
".kokoro/release/publish_javadoc.cfg",
7270
".kokoro/release/publish_javadoc.sh",
71+
".kokoro/release/publish_javadoc11.cfg",
72+
".kokoro/release/publish_javadoc11.sh",
7373
".kokoro/release/snapshot.cfg",
7474
".kokoro/release/snapshot.sh",
7575
".kokoro/release/stage.cfg",

0 commit comments

Comments
 (0)