From 22568e1f3ba398baad46227d1a18d37c1f6fe0fd Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Thu, 19 Nov 2020 15:41:11 -0800 Subject: [PATCH] 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 Source-Date: Thu Nov 19 12:24:02 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 68742c6016bf0d16948a572633d17955a8737414 Source-Link: https://github.com/googleapis/synthtool/commit/68742c6016bf0d16948a572633d17955a8737414 --- .kokoro/common.sh | 1 - .kokoro/release/stage.sh | 17 ++++++++++------- synth.metadata | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.kokoro/common.sh b/.kokoro/common.sh index a8d0ea04..ace89f45 100644 --- a/.kokoro/common.sh +++ b/.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/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 3c482cbc..16126d2e 100755 --- a/.kokoro/release/stage.sh +++ b/.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/synth.metadata b/synth.metadata index 675dc195..27f4a335 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-video-transcoder.git", - "sha": "897e1d22a5c3532556163b7fffe03726acbca864" + "sha": "52e581b2c994a1641bbe6e4fccec582aac694321" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58" + "sha": "68742c6016bf0d16948a572633d17955a8737414" } } ],