Skip to content

Commit 1fbc687

Browse files
chore(java): retry staging portion of the release with backoff (#156)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/cd9c661d-2c2a-445c-8604-a68baa1fdc55/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@68742c6
1 parent 6d21af6 commit 1fbc687

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

java-workflows/.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

java-workflows/.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

java-workflows/synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-workflows.git",
7-
"sha": "d2bb1559b77298e4656179ed0e33ff2d9d469e4a"
7+
"sha": "f8f596b6321a4927623fe9ba02ab7964a35a1c53"
88
}
99
},
1010
{
@@ -19,7 +19,7 @@
1919
"git": {
2020
"name": "synthtool",
2121
"remote": "https://github.com/googleapis/synthtool.git",
22-
"sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58"
22+
"sha": "68742c6016bf0d16948a572633d17955a8737414"
2323
}
2424
}
2525
],

0 commit comments

Comments
 (0)