From c94242122e159ace6db9551fef896c47d9268dae Mon Sep 17 00:00:00 2001 From: aboyko Date: Thu, 13 Jul 2023 20:03:22 -0400 Subject: [PATCH] GH Hosted: preparation for S3 --- .github/scripts/sign-exe-in-zip-file.sh | 13 +++++++++++-- .../experimental-eclipse-distro-build.yml | 16 ++++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/scripts/sign-exe-in-zip-file.sh b/.github/scripts/sign-exe-in-zip-file.sh index 963277c3f..bb62ecdbe 100755 --- a/.github/scripts/sign-exe-in-zip-file.sh +++ b/.github/scripts/sign-exe-in-zip-file.sh @@ -7,10 +7,19 @@ echo "****************************************************************" echo "*** Processing : ${file}" echo "****************************************************************" destination_folder_name=extracted_${filename} +echo "Extracting archive ${filename}" unzip -q $file -d ./${destination_folder_name} +echo "Successfully extracted ${filename}" sts_folder=`find ./${destination_folder_name} -maxdepth 1 -type d -name 'sts-*' -print -quit` -echo "Found folder: ${sts_folder}" +echo "Found STS distro folder: ${sts_folder}" ${workdir}/.github/scripts/sign-exe.sh ./${sts_folder}/SpringToolSuite4.exe ${sts_folder}/SpringToolSuite4.exe +echo "Adding to zip contents of a folder ${destination_folder_name}" zip -r -q $file ./${destination_folder_name} +echo "Successfully zipped ${destination_folder_name} into ${file}" java -jar ${workdir}/.github/scripts/self-extracting-jar-creator.jar $file -ls \ No newline at end of file + +filename_no_ext="${filename%.*}" +echo "Creating checksums sha-256 and md5" +sha256sum $file > ${file}.sha256 +md5sum $file > ${file}.md5 + diff --git a/.github/workflows/experimental-eclipse-distro-build.yml b/.github/workflows/experimental-eclipse-distro-build.yml index b3680af97..0ffd3387b 100644 --- a/.github/workflows/experimental-eclipse-distro-build.yml +++ b/.github/workflows/experimental-eclipse-distro-build.yml @@ -101,8 +101,6 @@ jobs: - name: Sign EXE within zip files id: sign env: - tools_s3_access_key: ${{ secrets.TOOLS_S3_ACCESS_KEY }} - tools_s3_secret_key: ${{ secrets.TOOLS_S3_SECRET_KEY }} SSH_KEY: ~/.ssh/id_rsa SSH_USER: signer run: | @@ -112,3 +110,17 @@ jobs: do ./.github/scripts/sign-exe-in-zip-file.sh $file 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: | + distro_target=${{ inputs.eclipse_profile }} + distro_target="${distro_target:0:2}.${distro_target:2} + ls spring-tool-suite-4*.zip* + echo "aws s3 sync rm spring-tool-suite-4*.zip* s3://dist.springsource.com/snapshot/STS4/nightly/dist/${distro_target}" + echo "aws s3 sync cp spring-tool-suite-4*.zip* s3://dist.springsource.com/snapshot/STS4/nightly/dist/${distro_target}" + ls spring-tool-suite-4*.jar* + echo "aws s3 sync rm spring-tool-suite-4*.jar* s3://dist.springsource.com/snapshot/STS4/nightly/dist/${distro_target}" + echo "aws s3 sync cp spring-tool-suite-4*.jar* s3://dist.springsource.com/snapshot/STS4/nightly/dist/${distro_target}"