Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
chore(java): retry staging portion of the release with backoff (#294)
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/4c821a8c-4190-41b5-8c86-6700d407154b/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 da3ae69 commit fa90e1b
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,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-scheduler.git",
"sha": "246c96200bd5f0d03bf6a1520f75c6edcce078b3"
"sha": "da3ae693d781c2e6dd5c63e87f99c9e507bcffcb"
}
},
{
Expand All @@ -19,7 +19,7 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58"
"sha": "68742c6016bf0d16948a572633d17955a8737414"
}
}
],
Expand Down

0 comments on commit fa90e1b

Please sign in to comment.