Skip to content

Commit

Permalink
Revert "Add JMOD signing retry and check curl rc (#823)"
Browse files Browse the repository at this point in the history
This reverts commit 16502bc.
  • Loading branch information
andrew-m-leonard authored Oct 9, 2023
1 parent 5fcae13 commit f2be92e
Showing 1 changed file with 2 additions and 42 deletions.
44 changes: 2 additions & 42 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1531,50 +1531,10 @@ class Build {
dir=$(dirname "$f")
file=$(basename "$f")
mv "$f" "${dir}/unsigned_${file}"
success=false
if [ "${base_os}" == "mac" ]; then
if ! curl --fail --silent --show-error -o "$f" -F file="@${dir}/unsigned_${file}" -F entitlements="@$ENTITLEMENTS" https://cbi.eclipse.org/macos/codesign/sign; then
echo "curl command failed, sign of $f failed"
else
success=true
fi
curl --fail --silent --show-error -o "$f" -F file="@${dir}/unsigned_${file}" -F entitlements="@$ENTITLEMENTS" https://cbi.eclipse.org/macos/codesign/sign
else
if ! curl --fail --silent --show-error -o "$f" -F file="@${dir}/unsigned_${file}" https://cbi.eclipse.org/authenticode/sign; then
echo "curl command failed, sign of $f failed"
else
success=true
fi
fi
if [ $success == false ]; then
# Retry up to 20 times
max_iterations=20
iteration=1
echo "Code Not Signed For File $f"
while [ $iteration -le $max_iterations ] && [ $success = false ]; do
echo $iteration Of $max_iterations
sleep 1
if [ "${base_os}" == "mac" ]; then
if curl --fail --silent --show-error -o "$f" -F file="@${dir}/unsigned_${file}" -F entitlements="@$ENTITLEMENTS" https://cbi.eclipse.org/macos/codesign/sign; then
success=true
fi
else
if curl --fail --silent --show-error -o "$f" -F file="@${dir}/unsigned_${file}" https://cbi.eclipse.org/authenticode/sign; then
success=true
fi
fi
if [ $success = false ]; then
echo "curl command failed, $f Failed Signing On Attempt $iteration"
iteration=$((iteration+1))
if [ $iteration -gt $max_iterations ]
then
echo "Errors Encountered During Signing"
exit 1
fi
else
echo "$f Signed OK On Attempt $iteration"
fi
done
curl --fail --silent --show-error -o "$f" -F file="@${dir}/unsigned_${file}" https://cbi.eclipse.org/authenticode/sign
fi
chmod --reference="${dir}/unsigned_${file}" "$f"
rm -rf "${dir}/unsigned_${file}"
Expand Down

0 comments on commit f2be92e

Please sign in to comment.