From cf26bb89e6b87afcac6bdaa07fb64fdee860b9b3 Mon Sep 17 00:00:00 2001 From: aboyko Date: Fri, 14 Jul 2023 18:26:01 -0400 Subject: [PATCH] Turn off win zip and jar creation and upload in the maven build --- .github/scripts/sign-exe-in-zip-file.sh | 6 +- .../gh-hosted-eclipse-distro-build.yml | 5 +- .../self-hosted-eclipse-distro-build.yml | 31 +++++++- eclipse-distribution/local-build.sh | 2 +- .../pom.xml | 77 +------------------ .../pom.xml | 76 ------------------ .../pom.xml | 77 +------------------ 7 files changed, 38 insertions(+), 236 deletions(-) diff --git a/.github/scripts/sign-exe-in-zip-file.sh b/.github/scripts/sign-exe-in-zip-file.sh index 0155b452b..80fda872f 100755 --- a/.github/scripts/sign-exe-in-zip-file.sh +++ b/.github/scripts/sign-exe-in-zip-file.sh @@ -1,6 +1,8 @@ set -e file=$1 +sign_script=$2 +self_extr_jar=$3 filename="$(basename -- $file)" workdir=`pwd` @@ -15,13 +17,13 @@ echo "Successfully extracted ${filename}" sts_folder=`find ./${destination_folder_name} -maxdepth 1 -type d -name 'sts-*' -print -quit` echo "Found STS distro folder: ${sts_folder}" echo "About to sign win exe file: ${sts_folder}/SpringToolSuite4.exe" -${workdir}/.github/scripts/sign-exe.sh ${sts_folder}/SpringToolSuite4.exe ${sts_folder}/SpringToolSuite4.exe +$sign_script ${sts_folder}/SpringToolSuite4.exe ${sts_folder}/SpringToolSuite4.exe echo "Adding to zip contents of a folder ${destination_folder_name}" cd ${destination_folder_name} zip -r -q ../$file . cd .. echo "Successfully zipped ${destination_folder_name} into ${file}" -java -jar ${workdir}/.github/scripts/self-extracting-jar-creator.jar $file +java -jar $self_extr_jar $file echo "Remove temporary ${destination_folder_name}" rm -rf ./${destination_folder_name} diff --git a/.github/workflows/gh-hosted-eclipse-distro-build.yml b/.github/workflows/gh-hosted-eclipse-distro-build.yml index 115965937..703f148c3 100644 --- a/.github/workflows/gh-hosted-eclipse-distro-build.yml +++ b/.github/workflows/gh-hosted-eclipse-distro-build.yml @@ -112,11 +112,10 @@ jobs: SSH_KEY: ~/.ssh/id_rsa SSH_USER: signer run: | - workdir=`pwd` - files=`ls *.zip` + files=`ls spring-tool-suite-4*win*.zip` for file in $files do - ./.github/scripts/sign-exe-in-zip-file.sh $file + ${{ 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 done - uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 with: diff --git a/.github/workflows/self-hosted-eclipse-distro-build.yml b/.github/workflows/self-hosted-eclipse-distro-build.yml index 978bba8fc..96ade68e0 100644 --- a/.github/workflows/self-hosted-eclipse-distro-build.yml +++ b/.github/workflows/self-hosted-eclipse-distro-build.yml @@ -28,6 +28,7 @@ jobs: with: ref: ${{ inputs.ref }} sparse-checkout: | + .github eclipse-distribution eclipse-extensions - name: Set up JDK 17 @@ -61,6 +62,32 @@ jobs: AC_PASSWORD: ${{ secrets.AC_PASSWORD }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} run: | - ls cd eclipse-distribution - ./mvnw --batch-mode -U clean deploy -P${{ inputs.eclipse_profile }} -P${{ inputs.build_type }} -Pgitactions -Pgpg.sign -Dsigning.skip=true -Dmaven.repo.local=~/.m2/repository-signed -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Ds3service.https-only=true -Dp2.replaceQualifier=true -Dorg.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout=1200000 -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.eclipserun.proxies=false -Dskip.osx.signing=false -Dskip.win.signing=false -Dskip.osx.notarizing=false -Dtycho.equinox.resolver.uses=true \ No newline at end of file + ./mvnw --batch-mode -U clean deploy -P${{ inputs.eclipse_profile }} -P${{ inputs.build_type }} -Pgitactions -Pgpg.sign -Dsigning.skip=true -Dmaven.repo.local=~/.m2/repository-signed -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Ds3service.https-only=true -Dp2.replaceQualifier=true -Dorg.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout=1200000 -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.eclipserun.proxies=false -Dskip.osx.signing=false -Dskip.win.signing=false -Dskip.osx.notarizing=false -Dtycho.equinox.resolver.uses=true + - name: Sign EXE within zip files + id: sign + env: + SSH_KEY: ~/.ssh/id_rsa + SSH_USER: signer + run: | + cd eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/products + 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 + done + - name: Update S3 + id: update-s3 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }} + run: | + dist_path=`cat ./eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/s3-dist-path.txt` + cd eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/products + echo "Processing S3 update..." + ls spring-tool-suite-4*win*.zip* + ls spring-tool-suite-4*win*.self-extracting.jar* + echo "Removing old win zip and self extracting jar files from s3..." + aws s3 rm s3://dist.springsource.com/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip*" --include "spring-tool-suite-4*win*.self-extracting.jar* --exclude "*/*"" + echo "Uploading new win zip and self extracting jar files to s3..." + aws s3 cp . s3://dist.springsource.com/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip*" --include "spring-tool-suite-4*win*.self-extracting.jar*" --exclude "*/*" --acl public-read --no-progress diff --git a/eclipse-distribution/local-build.sh b/eclipse-distribution/local-build.sh index 787abe5f3..6fb3b03d2 100755 --- a/eclipse-distribution/local-build.sh +++ b/eclipse-distribution/local-build.sh @@ -1,2 +1,2 @@ -./mvnw clean package -Pe428 -Psnapshot -Dsigning.skip=true -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.osx.signing=true -Dskip.win.signing=true -Dskip.osx.notarizing=true +./mvnw clean install -Pe428 -Psnapshot -Dsigning.skip=true -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.osx.signing=true -Dskip.win.signing=true -Dskip.osx.notarizing=true diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e427/pom.xml b/eclipse-distribution/org.springframework.boot.ide.product.e427/pom.xml index a5c9ad0c8..807f7beb0 100644 --- a/eclipse-distribution/org.springframework.boot.ide.product.e427/pom.xml +++ b/eclipse-distribution/org.springframework.boot.ide.product.e427/pom.xml @@ -327,22 +327,6 @@ - - generate-self-extracting-jar - verify - - exec - - - java - - -jar - ${project.build.directory}/../../common/self-extracting-jar-creator.jar - ${project.build.directory}/products/spring-tool-suite-4-${unqualifiedVersion}.${p2.qualifier}-${dist.target}-win32.win32.x86_64.zip - - - - @@ -352,48 +336,6 @@ 1.7 - - - win-exe-signing - package - - ${skip.win.signing} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - osx-app-signing @@ -444,6 +386,7 @@ osx-dmg-creation verify + ${skip.osx.notarizing} @@ -598,23 +541,11 @@ - - - - - - - - - - - - @@ -629,12 +560,6 @@ - - - - - - diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e428/pom.xml b/eclipse-distribution/org.springframework.boot.ide.product.e428/pom.xml index 965534ce2..bc17247e8 100644 --- a/eclipse-distribution/org.springframework.boot.ide.product.e428/pom.xml +++ b/eclipse-distribution/org.springframework.boot.ide.product.e428/pom.xml @@ -315,22 +315,6 @@ - - generate-self-extracting-jar - verify - - exec - - - java - - -jar - ${project.build.directory}/../../common/self-extracting-jar-creator.jar - ${project.build.directory}/products/spring-tool-suite-4-${unqualifiedVersion}.${p2.qualifier}-${dist.target}-win32.win32.x86_64.zip - - - - @@ -340,48 +324,6 @@ 1.7 - - - win-exe-signing - package - - ${skip.win.signing} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - osx-app-signing @@ -595,23 +537,11 @@ - - - - - - - - - - - - @@ -626,12 +556,6 @@ - - - - - - diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e429/pom.xml b/eclipse-distribution/org.springframework.boot.ide.product.e429/pom.xml index c496888a4..0bf02d99d 100644 --- a/eclipse-distribution/org.springframework.boot.ide.product.e429/pom.xml +++ b/eclipse-distribution/org.springframework.boot.ide.product.e429/pom.xml @@ -327,22 +327,6 @@ - - generate-self-extracting-jar - verify - - exec - - - java - - -jar - ${project.build.directory}/../../common/self-extracting-jar-creator.jar - ${project.build.directory}/products/spring-tool-suite-4-${unqualifiedVersion}.${p2.qualifier}-${dist.target}-win32.win32.x86_64.zip - - - - @@ -352,48 +336,6 @@ 1.7 - - - win-exe-signing - package - - ${skip.win.signing} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - osx-app-signing @@ -446,6 +388,7 @@ osx-dmg-creation verify + ${skip.osx.notarizing} @@ -606,23 +549,11 @@ - - - - - - - - - - - - @@ -637,12 +568,6 @@ - - - - - -