Skip to content

Commit 82b7408

Browse files
chore: regenerate common templates (#210)
* chore(java): enable generated-files-bot This bot will comment on pull requests that modify templated files. For java, we configure to read from our 2 synth.metadata files: (primary templates and README) Source-Author: Jeff Ching <chingor@google.com> Source-Date: Fri Oct 30 14:22:02 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: b19b401571e77192f8dd38eab5fb2300a0de9324 Source-Link: googleapis/synthtool@b19b401 * chore(java): use production staging bucket Source-Author: Les Vogel <lesv@users.noreply.github.com> Source-Date: Wed Nov 4 10:18:01 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: c7824ea48ff6d4d42dfae0849aec8a85acd90bd9 Source-Link: googleapis/synthtool@c7824ea * chore(java): ignore return code 28 in README autosynth job Exit code 28 is returned if no changes are required and should not be considered a failure. Source-Author: Jeff Ching <chingor@google.com> Source-Date: Mon Nov 9 14:51:28 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 7db8a6c5ffb12a6e4c2f799c18f00f7f3d60e279 Source-Link: googleapis/synthtool@7db8a6c * build(java): use code-suggester v1 tag rather than full semver Source-Author: Jeff Ching <chingor@google.com> Source-Date: Thu Nov 12 10:07:08 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 7d652819519dfa24da9e14548232e4aaba71a11c Source-Link: googleapis/synthtool@7d65281 * build(java): use actions/github-script v3 tag rather than full semver So that renovate-bot stops proposing PRs like [this](https://github.com/googleapis/java-bigquerydatatransfer/pull/515/files)! Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com> Source-Date: Tue Nov 17 13:02:02 2020 -0500 Source-Repo: googleapis/synthtool Source-Sha: 7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58 Source-Link: googleapis/synthtool@7fcc405 * chore(java): retry staging portion of the release with backoff * chore(java): retry staging portion of the release with backoff * build: skip logging the retried command - it may contain secrets Source-Author: Jeff Ching <chingor@google.com> Source-Date: Thu Nov 19 12:24:02 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 68742c6016bf0d16948a572633d17955a8737414 Source-Link: googleapis/synthtool@68742c6 * build(java): enable blunderbuss for samples Source-Author: Jeff Ching <chingor@google.com> Source-Date: Mon Nov 23 10:23:01 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 943bb78606d035001123030067dffcc34f4645f2 Source-Link: googleapis/synthtool@943bb78 * chore: Update publish_javadoc.sh * (chore) Update publish_javadoc.sh * add `export` to the envVar's to make sure maven knows about them. * report the Java version * chore: update script * remove `java -version` Co-authored-by: Jeffrey Rennie <rennie@google.com> Source-Author: Les Vogel <lesv@users.noreply.github.com> Source-Date: Mon Dec 7 09:37:58 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 5d11bd2888c38ce1fb6fa6bf25494a4219a73928 Source-Link: googleapis/synthtool@5d11bd2
1 parent 329f419 commit 82b7408

11 files changed

+46
-18
lines changed

.github/blunderbuss.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Configuration for the Blunderbuss GitHub app. For more info see
2+
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
3+
assign_prs_by:
4+
- labels:
5+
- samples
6+
to:
7+
- googleapis/java-samples-reviewers

.github/generated-files-bot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
externalManifests:
2+
- type: json
3+
file: 'synth.metadata'
4+
jsonpath: '$.generatedFiles[*]'
5+
- type: json
6+
file: '.github/readme/synth.metadata/synth.metadata'
7+
jsonpath: '$.generatedFiles[*]'

.github/workflows/approve-readme.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
88
steps:
9-
- uses: actions/github-script@v3.0.0
9+
- uses: actions/github-script@v3
1010
with:
1111
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
1212
script: |

.github/workflows/auto-release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
if: contains(github.head_ref, 'release-v')
88
steps:
9-
- uses: actions/github-script@v3.0.0
9+
- uses: actions/github-script@v3
1010
with:
1111
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
1212
debug: true

.github/workflows/formatting.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
java-version: 11
2020
- run: "mvn com.coveo:fmt-maven-plugin:format"
21-
- uses: googleapis/code-suggester@v1.8.0
21+
- uses: googleapis/code-suggester@v1
2222
with:
2323
command: review
2424
pull_number: ${{ github.event.pull_request.number }}

.kokoro/common.sh

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function retry_with_backoff {
2525

2626
# allow a failures to continue
2727
set +e
28-
echo "${command}"
2928
${command}
3029
exit_code=$?
3130

.kokoro/readme.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,18 @@ echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials
2828
git config --global credential.helper 'store --file ~/.git-credentials'
2929

3030
python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool
31+
32+
set +e
3133
python3.6 -m autosynth.synth \
3234
--repository=googleapis/java-shared-config \
3335
--synth-file-name=.github/readme/synth.py \
3436
--metadata-path=.github/readme/synth.metadata \
3537
--pr-title="chore: regenerate README" \
36-
--branch-suffix="readme"
38+
--branch-suffix="readme"
39+
40+
# autosynth returns 28 to signal there are no changes
41+
RETURN_CODE=$?
42+
if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]]
43+
then
44+
exit ${RETURN_CODE}
45+
fi

.kokoro/release/publish_javadoc.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env_vars: {
99

1010
env_vars: {
1111
key: "STAGING_BUCKET_V2"
12-
value: "docs-staging-v2-staging"
12+
value: "docs-staging-v2"
1313
# Production will be at: docs-staging-v2
1414
}
1515

.kokoro/release/publish_javadoc.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ python3 -m pip install gcp-docuploader
3838
# compile all packages
3939
mvn clean install -B -q -DskipTests=true
4040

41-
NAME=google-cloud-shared-config
42-
VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)
41+
export NAME=google-cloud-shared-config
42+
export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)
4343

4444
# build the docs
4545
mvn site -B -q
@@ -59,7 +59,8 @@ python3 -m docuploader upload . \
5959

6060
popd
6161

62-
# V2
62+
# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates.
63+
6364
mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/"
6465

6566
pushd target/devsite/reference

.kokoro/release/stage.sh

+10-7
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,22 @@ python3 -m pip install gcp-releasetool
2020
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
2121

2222
source $(dirname "$0")/common.sh
23+
source $(dirname "$0")/../common.sh
2324
MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml
2425
pushd $(dirname "$0")/../../
2526

2627
setup_environment_secrets
2728
create_settings_xml_file "settings.xml"
2829

29-
mvn clean install deploy -B \
30-
--settings ${MAVEN_SETTINGS_FILE} \
31-
-DskipTests=true \
32-
-DperformRelease=true \
33-
-Dgpg.executable=gpg \
34-
-Dgpg.passphrase=${GPG_PASSPHRASE} \
35-
-Dgpg.homedir=${GPG_HOMEDIR}
30+
# attempt to stage 3 times with exponential backoff (starting with 10 seconds)
31+
retry_with_backoff 3 10 \
32+
mvn clean install deploy -B \
33+
--settings ${MAVEN_SETTINGS_FILE} \
34+
-DskipTests=true \
35+
-DperformRelease=true \
36+
-Dgpg.executable=gpg \
37+
-Dgpg.passphrase=${GPG_PASSPHRASE} \
38+
-Dgpg.homedir=${GPG_HOMEDIR}
3639

3740
if [[ -n "${AUTORELEASE_PR}" ]]
3841
then

synth.metadata

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-shared-config.git",
7-
"sha": "be64fe9d3edc4de27d486c7a97a3dd03cfcab6e6"
7+
"sha": "329f41993a16830b2a1a4a7080aa15d4d842ba18"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "f68649c5f26bcff6817c6d21e90dac0fc71fef8e"
14+
"sha": "5d11bd2888c38ce1fb6fa6bf25494a4219a73928"
1515
}
1616
}
1717
],
@@ -21,6 +21,8 @@
2121
".github/ISSUE_TEMPLATE/feature_request.md",
2222
".github/ISSUE_TEMPLATE/support_request.md",
2323
".github/PULL_REQUEST_TEMPLATE.md",
24+
".github/blunderbuss.yml",
25+
".github/generated-files-bot.yml",
2426
".github/readme/synth.py",
2527
".github/snippet-bot.yml",
2628
".github/trusted-contribution.yml",

0 commit comments

Comments
 (0)