Skip to content

Commit 494fd66

Browse files
chore(java): retry staging portion of the release with backoff (#339)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/a571fa0d-937f-4072-b361-6272dcdc7f29/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@68742c6
1 parent 80c78fc commit 494fd66

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

java-core/.kokoro/common.sh

-1
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

java-core/.kokoro/release/stage.sh

+10-7
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

java-core/synth.metadata

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-core.git",
7-
"sha": "a647e2964c0830355cfd6f0023e08b0863691083"
7+
"sha": "23b5b1d8cdc1c48677e6305ac388ef50a33d6fc1"
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)