diff --git a/.github/scripts/sign-exe.sh b/.github/scripts/sign-exe.sh index 5f1995348..8a5832dee 100755 --- a/.github/scripts/sign-exe.sh +++ b/.github/scripts/sign-exe.sh @@ -10,13 +10,14 @@ echo "Copying ${in_file} to s3 s3://${AWS_S3_BUCKET}/exes-to-sign/${id}.exe for aws s3 cp $in_file s3://$AWS_S3_BUCKET/exes-to-sign/$id.exe --no-progress for (( i=wait_time; i /dev/null 2>&1 || true) - if [ -z "$object_exists" ]; then + aws s3api head-object --bucket $CDN_BUCKET --key spring-tools/exes-signed/$id.exe >/dev/null 2>&1 || not_exist=true + if [ $not_exist ]; then echo "Waited ${i} seconds but ${in_filename} hasn't been signed yet..." else echo "Successfully signed file ${in_filename}" break fi + unset not_exist } aws s3 mv s3://$AWS_S3_BUCKET/exes-signed/$id.exe $out_file --no-progress diff --git a/.github/workflows/gh-hosted-eclipse-distro-build.yml b/.github/workflows/gh-hosted-eclipse-distro-build.yml index 29ffb360f..bbd3efbf9 100644 --- a/.github/workflows/gh-hosted-eclipse-distro-build.yml +++ b/.github/workflows/gh-hosted-eclipse-distro-build.yml @@ -170,8 +170,20 @@ jobs: files=`ls spring-tool-suite-4*win*.zip` for file in $files do - ${{ github.workspace }}/.github/scripts/sign-exe-in-zip-file.sh $file ${{ github.workspace }}/.github/scripts/sign-exe.sh ${{ github.workspace }}/.github/scripts/self-extracting-jar-creator.jar ${{ github.run_id }} + ${{ github.workspace }}/.github/scripts/sign-exe-in-zip-file.sh $file ${{ github.workspace }}/.github/scripts/sign-exe.sh ${{ github.workspace }}/.github/scripts/self-extracting-jar-creator.jar ${{ github.run_id }} & done + FAIL=0 + for job in `jobs -p` + do + wait $job || let "FAIL+=1" + done + if [ "$FAIL" == "0" ]; + then + echo "Done signing EXE files" + else + echo "Failed signing one or more EXE files" + exit 1 + fi - name: Update Win zip/jar on S3 id: update-s3 run: |