Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2020-08-14 14:18:50 +0000
committerSravan Kumar Lakkimsetti2020-08-14 14:18:50 +0000
commited937628340619568082db1defcced69ac4ab4d6 (patch)
treeb051d08a994c044115fa51ae428bc9dc76d9b99b
parent5add09f990e0f2f4539feb62cfc3c38fef2510d2 (diff)
downloadeclipse.platform.releng.aggregator-ed937628340619568082db1defcced69ac4ab4d6.tar.gz
eclipse.platform.releng.aggregator-ed937628340619568082db1defcced69ac4ab4d6.tar.xz
eclipse.platform.releng.aggregator-ed937628340619568082db1defcced69ac4ab4d6.zip
Bug 565989 - Made notarization code more resilient
- copied from Mikael Barbero's work Change-Id: I51930adfadb304c56f8f547fa2a96507d5b1b32a Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
-rwxr-xr-xcje-production/scripts/common-functions.shsource10
1 files changed, 6 insertions, 4 deletions
diff --git a/cje-production/scripts/common-functions.shsource b/cje-production/scripts/common-functions.shsource
index 3519a0bb4..c3ba6f8da 100755
--- a/cje-production/scripts/common-functions.shsource
+++ b/cje-production/scripts/common-functions.shsource
@@ -57,9 +57,9 @@ fn-notarize-macbuild ()
retryCount=3
while [ ${retryCount} -gt 0 ]; do
- RAW_RESPONSE=$(curl -s --write-out "\n%{http_code}" -X POST -F file=@"${DMG}" -F 'options={"primaryBundleId": "'"${PRIMARY_BUNDLE_ID}"'", "staple": true};type=application/json' http://172.30.206.146:8383/macos-notarization-service/notarize || : )
+ RAW_RESPONSE=$(curl -sS --write-out "\n%{http_code}" -X POST -F file=@"${DMG}" -F 'options={"primaryBundleId": "'"${PRIMARY_BUNDLE_ID}"'", "staple": true};type=application/json' http://172.30.206.146:8383/macos-notarization-service/notarize || : )
- RESPONSE=$(head -n1 <<<"${RAW_RESPONSE}")
+ RESPONSE=$(head -n-1 <<<"${RAW_RESPONSE}")
STATUS_CODE=$(tail -n1 <<<"${RAW_RESPONSE}")
if [[ "${STATUS_CODE}" != "200" ]]; then
@@ -71,6 +71,7 @@ fn-notarize-macbuild ()
exit 1
else
echo "Retrying..."
+ sleep 2
fi
fi
@@ -79,7 +80,7 @@ fn-notarize-macbuild ()
while [[ ${STATUS} == 'IN_PROGRESS' ]]; do
sleep 1m
- RESPONSE=$(curl -s "http://172.30.206.146:8383/macos-notarization-service/${UUID}/status")
+ RESPONSE=$(curl -sS "http://172.30.206.146:8383/macos-notarization-service/${UUID}/status")
STATUS=$(echo "$RESPONSE" | grep -Po '"status"\s*:\s*"\K[^"]+' || : )
done
@@ -91,6 +92,7 @@ fn-notarize-macbuild ()
exit 1
else
echo "Retrying..."
+ sleep 2
fi
else
break
@@ -100,7 +102,7 @@ fn-notarize-macbuild ()
rm "${DMG}"
- curl -JO "http://172.30.206.146:8383/macos-notarization-service/${UUID}/download"
+ curl -sSJO "http://172.30.206.146:8383/macos-notarization-service/${UUID}/download"
popd || exit 5
set +x
}

Back to the top