Skip to content

Commit

Permalink
[GHA] Correct download page update
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex committed Jul 10, 2024
1 parent d8a68ec commit 7646095
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .github/scripts/update-distro-download-page.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@ set -e
dist_path=$1
eclipse_version=$2
build_type=$3
s3_bucket=$4
download_url_root=$5

# Akamai tools-spring-io bucket
s3_url=s3://tools-spring-io/${dist_path}
s3_url=s3://${s3_bucket}/${dist_path}
downloads_html="sts4-nightly-${eclipse_version}.html"
files=`aws s3 cp ${s3_url} . --recursive --exclude "*" --include "spring-tool-suite-4*.zip" --include "spring-tool-suite-4*.dmg" --include "spring-tool-suite-4*.self-extracting.jar" --include "spring-tool-suite-4*.tar.gz" --exclude "*/*" --dryrun`
rm -f ./${downloads_html}
echo '<ul>' >> $downloads_html
for file in $files
do
if [[ "$file" =~ ^"s3://tools-spring-io" ]]; then
download_url=https://cdn.spring.io/spring-tools${file:20} #
download_url=${download_url_root}${file:20} #
filename=${file:${#s3_url}+1}
echo ' <li><a href="'${download_url}'">'${filename}'</li>' >> $downloads_html
fi
done
echo '</ul>' >> $downloads_html
cat ./$downloads_html
aws s3 mv ./$downloads_html s3://tools-spring-io/${build_type}/STS4/ --no-progress
aws s3 mv ./$downloads_html s3://${s3_bucket}/${build_type}/STS4/ --no-progress
6 changes: 3 additions & 3 deletions .github/workflows/gh-hosted-eclipse-distro-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
run: |
eclipse_profile=${{ inputs.eclipse_profile }}
eclipse_version=${eclipse_profile:0:2}.${eclipse_profile:2}
${{ github.workspace }}/.github/scripts/update-distro-download-page.sh ${{ steps.s3-paths.outputs.dist_path }} $eclipse_version ${{ inputs.build_type }}
${{ github.workspace }}/.github/scripts/update-distro-download-page.sh ${{ steps.s3-paths.outputs.dist_path }} $eclipse_version ${{ inputs.build_type }} $AWS_S3_BUCKET $DOWNLOAD_URL_ROOT
- name: Upload Build Artifacts for Signing
run: |
echo "Uploading Win Zips and OSX tar.gz to S3 for signing..."
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
dist_path=${{ needs.eclipse-distro-build.outputs.dist_path }}
eclipse_profile=${{ inputs.eclipse_profile }}
eclipse_version=${eclipse_profile:0:2}.${eclipse_profile:2}
${{ github.workspace }}/.github/scripts/update-distro-download-page.sh $dist_path $eclipse_version ${{ inputs.build_type }}
${{ github.workspace }}/.github/scripts/update-distro-download-page.sh $dist_path $eclipse_version ${{ inputs.build_type }} $AWS_S3_BUCKET $DOWNLOAD_URL_ROOT
- name: Cleanup
if: ${{ always() }}
env:
Expand Down Expand Up @@ -280,7 +280,7 @@ jobs:
dist_path=${{ needs.eclipse-distro-build.outputs.dist_path }}
eclipse_profile=${{ inputs.eclipse_profile }}
eclipse_version=${eclipse_profile:0:2}.${eclipse_profile:2}
${{ github.workspace }}/.github/scripts/update-distro-download-page.sh $dist_path $eclipse_version ${{ inputs.build_type }}
${{ github.workspace }}/.github/scripts/update-distro-download-page.sh $dist_path $eclipse_version ${{ inputs.build_type }} $AWS_S3_BUCKET $DOWNLOAD_URL_ROOT
- name: Cleanup
if: ${{ always() }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion eclipse-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<dist.pathpostfix>nightly</dist.pathpostfix>
<dist.path>${dist.type}/${dist.key}/${dist.project}/${dist.pathpostfix}</dist.path>

<sts4-language-servers-p2-repo>https://cdn.spring.io/spring-tools/${dist.type}/TOOLS/sts4-language-server-integrations/${sts4-language-servers-version}</sts4-language-servers-p2-repo>
<sts4-language-servers-p2-repo>https://cdn-test.spring.io/spring-tools/${dist.type}/TOOLS/sts4-language-server-integrations/${sts4-language-servers-version}</sts4-language-servers-p2-repo>

<tycho-version>4.0.8</tycho-version>
<encoding>UTF-8</encoding>
Expand Down

0 comments on commit 7646095

Please sign in to comment.