Skip to content

Commit

Permalink
chore(java): retry staging portion of the release with backoff (googl…
Browse files Browse the repository at this point in the history
…eapis#318)

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 authored Nov 20, 2020
1 parent 1d12cea commit d00d115
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
1 change: 0 additions & 1 deletion java-resourcemanager/.kokoro/common.sh
Original file line number Diff line number Diff line change
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 java-resourcemanager/.kokoro/release/stage.sh
Original file line number Diff line number Diff line change
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 java-resourcemanager/synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
],
Expand Down

0 comments on commit d00d115

Please sign in to comment.