Skip to content

Commit

Permalink
chore(java): enable blunderbuss for samples and backoff retry for sta…
Browse files Browse the repository at this point in the history
…ging releases (#667)

* 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
  • Loading branch information
yoshi-automation committed Nov 26, 2020
1 parent c035546 commit 0c30632
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .github/blunderbuss.yml
@@ -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
1 change: 0 additions & 1 deletion .kokoro/common.sh
Expand Up @@ -25,7 +25,6 @@ function retry_with_backoff {

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

Expand Down
17 changes: 10 additions & 7 deletions .kokoro/release/stage.sh
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
5 changes: 3 additions & 2 deletions synth.metadata
Expand Up @@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-spanner.git",
"sha": "0f9b7bdc81a4eeecf772022bcec585bd1630895b"
"sha": "907ae1ff2f5c0b60510c435f5ba270bd92827104"
}
},
{
Expand All @@ -19,7 +19,7 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58"
"sha": "943bb78606d035001123030067dffcc34f4645f2"
}
}
],
Expand Down Expand Up @@ -57,6 +57,7 @@
".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/release-please.yml",
Expand Down

0 comments on commit 0c30632

Please sign in to comment.