From d00d1159c2b353a3d5a996118f83c1c7296f9a94 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 20 Nov 2020 08:08:25 -0800 Subject: [PATCH] chore(java): retry staging portion of the release with backoff (#318) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4c821a8c-4190-41b5-8c86-6700d407154b/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/68742c6016bf0d16948a572633d17955a8737414 --- java-resourcemanager/.kokoro/common.sh | 1 - java-resourcemanager/.kokoro/release/stage.sh | 17 ++++++++++------- java-resourcemanager/synth.metadata | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/java-resourcemanager/.kokoro/common.sh b/java-resourcemanager/.kokoro/common.sh index a8d0ea04d37d..ace89f45a9de 100644 --- a/java-resourcemanager/.kokoro/common.sh +++ b/java-resourcemanager/.kokoro/common.sh @@ -25,7 +25,6 @@ function retry_with_backoff { # allow a failures to continue set +e - echo "${command}" ${command} exit_code=$? diff --git a/java-resourcemanager/.kokoro/release/stage.sh b/java-resourcemanager/.kokoro/release/stage.sh index 3c482cbc55f1..16126d2eb53f 100755 --- a/java-resourcemanager/.kokoro/release/stage.sh +++ b/java-resourcemanager/.kokoro/release/stage.sh @@ -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 diff --git a/java-resourcemanager/synth.metadata b/java-resourcemanager/synth.metadata index 056fda32e4f8..1adf62cc3e37 100644 --- a/java-resourcemanager/synth.metadata +++ b/java-resourcemanager/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-resourcemanager.git", - "sha": "918e406342443b8b63402ed832db71b9d0cf3f6f" + "sha": "f61aed4f8670b9575a9d2aa50e9eff406eb36491" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58" + "sha": "68742c6016bf0d16948a572633d17955a8737414" } } ],