Skip to content

Commit 8d6588e

Browse files
chore(java): retry staging portion of the release with backoff (#1646)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/5dd1c41b-c3e8-424e-9ebc-c89c7604838a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@68742c6
1 parent 3303130 commit 8d6588e

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.kokoro/common.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function retry_with_backoff {
2525

2626
# allow a failures to continue
2727
set +e
28-
echo "${command}"
2928
${command}
3029
exit_code=$?
3130

.kokoro/release/stage.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,22 @@ python3 -m pip install gcp-releasetool
2020
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
2121

2222
source $(dirname "$0")/common.sh
23+
source $(dirname "$0")/../common.sh
2324
MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml
2425
pushd $(dirname "$0")/../../
2526

2627
setup_environment_secrets
2728
create_settings_xml_file "settings.xml"
2829

29-
mvn clean install deploy -B \
30-
--settings ${MAVEN_SETTINGS_FILE} \
31-
-DskipTests=true \
32-
-DperformRelease=true \
33-
-Dgpg.executable=gpg \
34-
-Dgpg.passphrase=${GPG_PASSPHRASE} \
35-
-Dgpg.homedir=${GPG_HOMEDIR}
30+
# attempt to stage 3 times with exponential backoff (starting with 10 seconds)
31+
retry_with_backoff 3 10 \
32+
mvn clean install deploy -B \
33+
--settings ${MAVEN_SETTINGS_FILE} \
34+
-DskipTests=true \
35+
-DperformRelease=true \
36+
-Dgpg.executable=gpg \
37+
-Dgpg.passphrase=${GPG_PASSPHRASE} \
38+
-Dgpg.homedir=${GPG_HOMEDIR}
3639

3740
if [[ -n "${AUTORELEASE_PR}" ]]
3841
then

synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/google-api-java-client.git",
7-
"sha": "51f36dcf08aaba585f38b2bfb78ec74d71623738"
7+
"sha": "33031309159faae990f6ac0cf3d194310bf9d4ac"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58"
14+
"sha": "68742c6016bf0d16948a572633d17955a8737414"
1515
}
1616
}
1717
],

0 commit comments

Comments
 (0)