Skip to content

Commit

Permalink
chore(java): retry staging portion of the release with backoff (#629)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/407a758f-25d9-475d-8ed1-b8b2eb5d7c99/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@68742c6
  • Loading branch information
yoshi-automation committed Nov 20, 2020
1 parent 243a3cb commit ee28088
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
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
4 changes: 2 additions & 2 deletions synth.metadata
Expand Up @@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-storage.git",
"sha": "a61d7707f548f010adba45359d764233eca860f8"
"sha": "243a3cb1506b2e2d609210dc4e9608637c06d7f3"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58"
"sha": "68742c6016bf0d16948a572633d17955a8737414"
}
}
],
Expand Down

0 comments on commit ee28088

Please sign in to comment.