Skip to content

Commit

Permalink
chore: regenerate common templates (#210)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
yoshi-automation committed Dec 30, 2020
1 parent 329f419 commit 82b7408
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 18 deletions.
7 changes: 7 additions & 0 deletions .github/blunderbuss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Configuration for the Blunderbuss GitHub app. For more info see
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
assign_prs_by:
- labels:
- samples
to:
- googleapis/java-samples-reviewers
7 changes: 7 additions & 0 deletions .github/generated-files-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
externalManifests:
- type: json
file: 'synth.metadata'
jsonpath: '$.generatedFiles[*]'
- type: json
file: '.github/readme/synth.metadata/synth.metadata'
jsonpath: '$.generatedFiles[*]'
2 changes: 1 addition & 1 deletion .github/workflows/approve-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
steps:
- uses: actions/github-script@v3.0.0
- uses: actions/github-script@v3
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
if: contains(github.head_ref, 'release-v')
steps:
- uses: actions/github-script@v3.0.0
- uses: actions/github-script@v3
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
debug: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
java-version: 11
- run: "mvn com.coveo:fmt-maven-plugin:format"
- uses: googleapis/code-suggester@v1.8.0
- uses: googleapis/code-suggester@v1
with:
command: review
pull_number: ${{ github.event.pull_request.number }}
Expand Down
1 change: 0 additions & 1 deletion .kokoro/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function retry_with_backoff {

# allow a failures to continue
set +e
echo "${command}"
${command}
exit_code=$?

Expand Down
11 changes: 10 additions & 1 deletion .kokoro/readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,18 @@ echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials
git config --global credential.helper 'store --file ~/.git-credentials'

python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool

set +e
python3.6 -m autosynth.synth \
--repository=googleapis/java-shared-config \
--synth-file-name=.github/readme/synth.py \
--metadata-path=.github/readme/synth.metadata \
--pr-title="chore: regenerate README" \
--branch-suffix="readme"
--branch-suffix="readme"

# autosynth returns 28 to signal there are no changes
RETURN_CODE=$?
if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]]
then
exit ${RETURN_CODE}
fi
2 changes: 1 addition & 1 deletion .kokoro/release/publish_javadoc.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env_vars: {

env_vars: {
key: "STAGING_BUCKET_V2"
value: "docs-staging-v2-staging"
value: "docs-staging-v2"
# Production will be at: docs-staging-v2
}

Expand Down
7 changes: 4 additions & 3 deletions .kokoro/release/publish_javadoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ python3 -m pip install gcp-docuploader
# compile all packages
mvn clean install -B -q -DskipTests=true

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

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

popd

# V2
# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates.

mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/"

pushd target/devsite/reference
Expand Down
17 changes: 10 additions & 7 deletions .kokoro/release/stage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@ python3 -m pip install gcp-releasetool
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script

source $(dirname "$0")/common.sh
source $(dirname "$0")/../common.sh
MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml
pushd $(dirname "$0")/../../

setup_environment_secrets
create_settings_xml_file "settings.xml"

mvn clean install deploy -B \
--settings ${MAVEN_SETTINGS_FILE} \
-DskipTests=true \
-DperformRelease=true \
-Dgpg.executable=gpg \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dgpg.homedir=${GPG_HOMEDIR}
# attempt to stage 3 times with exponential backoff (starting with 10 seconds)
retry_with_backoff 3 10 \
mvn clean install deploy -B \
--settings ${MAVEN_SETTINGS_FILE} \
-DskipTests=true \
-DperformRelease=true \
-Dgpg.executable=gpg \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dgpg.homedir=${GPG_HOMEDIR}

if [[ -n "${AUTORELEASE_PR}" ]]
then
Expand Down
6 changes: 4 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-shared-config.git",
"sha": "be64fe9d3edc4de27d486c7a97a3dd03cfcab6e6"
"sha": "329f41993a16830b2a1a4a7080aa15d4d842ba18"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "f68649c5f26bcff6817c6d21e90dac0fc71fef8e"
"sha": "5d11bd2888c38ce1fb6fa6bf25494a4219a73928"
}
}
],
Expand All @@ -21,6 +21,8 @@
".github/ISSUE_TEMPLATE/feature_request.md",
".github/ISSUE_TEMPLATE/support_request.md",
".github/PULL_REQUEST_TEMPLATE.md",
".github/blunderbuss.yml",
".github/generated-files-bot.yml",
".github/readme/synth.py",
".github/snippet-bot.yml",
".github/trusted-contribution.yml",
Expand Down

0 comments on commit 82b7408

Please sign in to comment.