Skip to content

Commit 21a4a5a

Browse files
chore: regenerate common templates (#1263)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/0d4d941a-5efc-4e3b-ae4a-c5a7ef2f7187/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@6946fd7 Source-Link: googleapis/synthtool@1aeca92 Source-Link: googleapis/synthtool@b416a7b Source-Link: googleapis/synthtool@f327d3b Source-Link: googleapis/synthtool@2414b81 Source-Link: googleapis/synthtool@692715c Source-Link: googleapis/synthtool@27b2d4f Source-Link: googleapis/synthtool@140ba24 Source-Link: googleapis/synthtool@e935c9e Source-Link: googleapis/synthtool@5de29e9 Source-Link: googleapis/synthtool@d1bb917
1 parent 20f2bd0 commit 21a4a5a

File tree

12 files changed

+121
-64
lines changed

12 files changed

+121
-64
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:

.github/workflows/samples.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on:
2+
pull_request:
3+
name: samples
4+
jobs:
5+
checkstyle:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- uses: actions/setup-java@v1
10+
with:
11+
java-version: 8
12+
- name: Run checkstyle
13+
run: mvn -P lint --quiet --batch-mode checkstyle:check
14+
working-directory: samples/snippets

.kokoro/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo ${JOB_TYPE}
2929

3030
# attempt to install 3 times with exponential backoff (starting with 10 seconds)
3131
retry_with_backoff 3 10 \
32-
mvn install -B -V \
32+
mvn install -B -V -ntp \
3333
-DskipTests=true \
3434
-Dclirr.skip=true \
3535
-Denforcer.skip=true \
@@ -60,6 +60,7 @@ javadoc)
6060
;;
6161
integration)
6262
mvn -B ${INTEGRATION_TEST_ARGS} \
63+
-ntp \
6364
-Penable-integration-tests \
6465
-DtrimStackTrace=false \
6566
-Dclirr.skip=true \
@@ -81,6 +82,7 @@ samples)
8182
pushd ${SAMPLES_DIR}
8283
mvn -B \
8384
-Penable-samples \
85+
-ntp \
8486
-DtrimStackTrace=false \
8587
-Dclirr.skip=true \
8688
-Denforcer.skip=true \

.kokoro/dependencies.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
3131

3232
# this should run maven enforcer
3333
retry_with_backoff 3 10 \
34-
mvn install -B -V \
34+
mvn install -B -V -ntp \
3535
-DskipTests=true \
3636
-Dclirr.skip=true
3737

@@ -86,4 +86,4 @@ then
8686
else
8787
msg "Errors found. See log statements above."
8888
exit 1
89-
fi
89+
fi

.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}

.kokoro/release/publish_javadoc11.cfg

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-http-java-client/.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"

.kokoro/release/publish_javadoc11.sh

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-http-client
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-

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Apache License
32
Version 2.0, January 2004
43
http://www.apache.org/licenses/

synth.metadata

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/google-http-java-client.git",
7-
"sha": "8f95371cf5681fbc67bd598d74089f38742a1177"
7+
"sha": "213726a0b65f35fdc65713027833d22b553bbc20"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "3816b080296d4d52975079fd26c110dd26ba25af"
14+
"sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2"
1515
}
1616
}
1717
],
@@ -30,6 +30,7 @@
3030
".github/workflows/approve-readme.yaml",
3131
".github/workflows/auto-release.yaml",
3232
".github/workflows/ci.yaml",
33+
".github/workflows/samples.yaml",
3334
".kokoro/build.bat",
3435
".kokoro/build.sh",
3536
".kokoro/coerce_logs.sh",
@@ -39,7 +40,6 @@
3940
".kokoro/continuous/java8.cfg",
4041
".kokoro/continuous/readme.cfg",
4142
".kokoro/dependencies.sh",
42-
".kokoro/linkage-monitor.sh",
4343
".kokoro/nightly/common.cfg",
4444
".kokoro/nightly/integration.cfg",
4545
".kokoro/nightly/java11.cfg",
@@ -71,6 +71,8 @@
7171
".kokoro/release/promote.sh",
7272
".kokoro/release/publish_javadoc.cfg",
7373
".kokoro/release/publish_javadoc.sh",
74+
".kokoro/release/publish_javadoc11.cfg",
75+
".kokoro/release/publish_javadoc11.sh",
7476
".kokoro/release/snapshot.cfg",
7577
".kokoro/release/snapshot.sh",
7678
".kokoro/release/stage.cfg",

0 commit comments

Comments
 (0)