diff --git a/.github/actions/cloudflare-purge/action.yml b/.github/actions/cloudflare-purge/action.yml
new file mode 100644
index 000000000..21d80aacd
--- /dev/null
+++ b/.github/actions/cloudflare-purge/action.yml
@@ -0,0 +1,68 @@
+name: Cloudflare Purge
+description: Purge Cloudflare Cache
+inputs:
+ urls:
+ description: urls
+ required: true
+ cloudflare_zone_id:
+ description: CloudFlare zone id
+ required: true
+ cloudflare_cache_token:
+ description: CloudFlare cache token
+ required: true
+runs:
+ using: "composite"
+ steps:
+ - name: Purge
+ shell: bash
+ run: |
+ MAX=50000
+ urls="${{ inputs.urls }}"
+ echo "Size=${#urls}"
+ if [ ${#urls} -ge $MAX ]; then
+ echo "Too many URLs. Splitting URLS in batches..."
+ indices=`echo $urls | grep -o -b " "`
+ offset=0
+ length=0
+ for idx in $indices
+ do
+ end=${idx%:*}
+ new_length=$((end - offset))
+ if [ $new_length -ge $MAX ]; then
+ echo "Batch from offset ${offset} of length ${length}"
+
+ subarray=${urls:$offset:$length}
+ batch=`jq --compact-output --null-input '$ARGS.positional' --args -- $subarray`
+ json="{\"files\": ${batch}}"
+
+ curl -v -X POST 'https://api.cloudflare.com/client/v4/zones/${{ inputs.cloudflare_zone_id }}/purge_cache' \
+ -H 'Content-Type:application/json' -H 'Authorization: Bearer ${{ inputs.cloudflare_cache_token }}' \
+ --data "${json}"
+
+ offset=$((offset + length))
+ length=$((end - offset))
+ else
+ length=$new_length
+ fi
+ done
+ if [ $length -gt 0 ]; then
+ length=$((${#urls} - offset + 1))
+ echo "Last Batch from offset ${offset} of length ${length}"
+
+ subarray=${urls:$offset:$length}
+ batch=`jq --compact-output --null-input '$ARGS.positional' --args -- $subarray`
+ json="{\"files\": ${batch}}"
+
+ curl -v -X POST 'https://api.cloudflare.com/client/v4/zones/${{ inputs.cloudflare_zone_id }}/purge_cache' \
+ -H 'Content-Type:application/json' -H 'Authorization: Bearer ${{ inputs.cloudflare_cache_token }}' \
+ --data "${json}"
+ fi
+ else
+ echo "Executing single Purge command..."
+ batch=`jq --compact-output --null-input '$ARGS.positional' --args -- $subarray`
+ json="{\"files\": ${batch}}"
+
+ curl -v -X POST 'https://api.cloudflare.com/client/v4/zones/${{ inputs.cloudflare_zone_id }}/purge_cache' \
+ -H 'Content-Type:application/json' -H 'Authorization: Bearer ${{ inputs.cloudflare_cache_token }}' \
+ --data "${json}"
+ fi
diff --git a/.github/scripts/update-distro-download-page.sh b/.github/scripts/update-distro-download-page.sh
index 67807e600..3e45c82d5 100755
--- a/.github/scripts/update-distro-download-page.sh
+++ b/.github/scripts/update-distro-download-page.sh
@@ -3,21 +3,24 @@ 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 '
' >> $downloads_html
+s3_url_prefix="s3://${AWS_S3_BUCKET}"
+s3_url_prefix_length=${#s3_url_prefix}
for file in $files
do
- if [[ "$file" =~ ^"s3://tools-spring-io" ]]; then
- download_url=https://cdn.spring.io/spring-tools${file:20} #
+ if [[ "$file" =~ ^"${s3_url_prefix}" ]]; then
+ download_url=${download_url_root}${file:$s3_url_prefix_length} #
filename=${file:${#s3_url}+1}
echo ' - '${filename}'
' >> $downloads_html
fi
done
echo '
' >> $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
diff --git a/.github/workflows/aggregate-distro-update-sites.yml b/.github/workflows/aggregate-distro-update-sites.yml
index 1dcd45a6a..1bf232d4d 100644
--- a/.github/workflows/aggregate-distro-update-sites.yml
+++ b/.github/workflows/aggregate-distro-update-sites.yml
@@ -12,6 +12,14 @@ on:
required: true
type: string
+env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }}
+ AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }}/spring-tools
+ DOWNLOAD_URL_ROOT: https://cdn.spring.io/spring-tools
+
jobs:
update-aggregate-update-sites:
@@ -26,16 +34,6 @@ jobs:
- name: Timestamp
id: timestamp
run: echo "date=`echo $(($(date +%s%N) / 1000000))`" >> $GITHUB_OUTPUT
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Generate and Upload Aggregate Update Sites Data
id: gen-aggregate-sites
env:
@@ -43,7 +41,7 @@ jobs:
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
run: |
echo "Akamai S3 Aggregate Update Sites Creation..."
- dirs=`aws s3 ls s3://tools-spring-io/release/TOOLS/sts4/update/${{ inputs.version }}/`
+ dirs=`aws s3 ls s3://${AWS_S3_BUCKET}/release/TOOLS/sts4/update/${{ inputs.version }}/`
echo "${dirs}"
pattern='^e[0-9]+.[0-9]+/$'
invalid_urls=""
@@ -52,7 +50,7 @@ jobs:
if [[ "$dir" =~ $pattern ]]; then
echo "Found ${dir}"
dir_name=${dir:0:-1}
- site_url="https://cdn.spring.io/spring-tools/release/TOOLS/sts4/update/${{ inputs.version }}/${dir_name}"
+ site_url="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4/update/${{ inputs.version }}/${dir_name}"
if [[ ${dir_name} == "e4.30" ]] || ; then
${{ github.workspace }}/.github/scripts/generate-composite-site-files.sh ${{ steps.timestamp.outputs.date }} $site_url
else
@@ -61,20 +59,20 @@ jobs:
cat ./compositeArtifacts.xml
cat ./compositeContent.xml
if [[ ${dir_name} == ${{ inputs.latest }} ]]; then
- aws s3 cp ./compositeArtifacts.xml s3://tools-spring-io/release/TOOLS/sts4/update/latest/
- invalid_urls+="https://cdn.spring.io/spring-tools/release/TOOLS/sts4/update/latest/compositeArtifacts.xml "
- aws s3 cp ./compositeContent.xml s3://tools-spring-io/release/TOOLS/sts4/update/latest/
- invalid_urls+="https://cdn.spring.io/spring-tools/release/TOOLS/sts4/update/latest/compositeContent.xml "
- aws s3 cp ./p2.index s3://tools-spring-io/release/TOOLS/sts4/update/latest/
- invalid_urls+="https://cdn.spring.io/spring-tools/release/TOOLS/sts4/update/latest/p2.index "
+ aws s3 cp ./compositeArtifacts.xml s3://${AWS_S3_BUCKET}/release/TOOLS/sts4/update/latest/
+ invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4/update/latest/compositeArtifacts.xml "
+ aws s3 cp ./compositeContent.xml s3://${AWS_S3_BUCKET}/release/TOOLS/sts4/update/latest/
+ invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4/update/latest/compositeContent.xml "
+ aws s3 cp ./p2.index s3://${AWS_S3_BUCKET}/release/TOOLS/sts4/update/latest/
+ invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4/update/latest/p2.index "
echo "TODO: Purge Cache"
fi
- aws s3 mv ./compositeArtifacts.xml s3://tools-spring-io/release/TOOLS/sts4/update/${dir}
- invalid_urls+="https://cdn.spring.io/spring-tools/release/TOOLS/sts4/update/${dir_name}/compositeArtifacts.xml "
- aws s3 mv ./compositeContent.xml s3://tools-spring-io/release/TOOLS/sts4/update/${dir}
- invalid_urls+="https://cdn.spring.io/spring-tools/release/TOOLS/sts4/update/${dir_name}/compositeContent.xml "
- aws s3 mv ./p2.index s3://tools-spring-io/release/TOOLS/sts4/update/${dir}
- invalid_urls+="https://cdn.spring.io/spring-tools/release/TOOLS/sts4/update/${dir_name}/p2.index "
+ aws s3 mv ./compositeArtifacts.xml s3://${AWS_S3_BUCKET}/release/TOOLS/sts4/update/${dir}
+ invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4/update/${dir_name}/compositeArtifacts.xml "
+ aws s3 mv ./compositeContent.xml s3://${AWS_S3_BUCKET}/release/TOOLS/sts4/update/${dir}
+ invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4/update/${dir_name}/compositeContent.xml "
+ aws s3 mv ./p2.index s3://${AWS_S3_BUCKET}/release/TOOLS/sts4/update/${dir}
+ invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4/update/${dir_name}/p2.index "
fi
done
echo "invalid_urls=$invalid_urls" >> $GITHUB_OUTPUT
diff --git a/.github/workflows/aggregate-ls-extensions-update-site.yml b/.github/workflows/aggregate-ls-extensions-update-site.yml
index decfdf919..4d25ba94c 100644
--- a/.github/workflows/aggregate-ls-extensions-update-site.yml
+++ b/.github/workflows/aggregate-ls-extensions-update-site.yml
@@ -8,6 +8,14 @@ on:
required: true
type: string
+env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }}
+ AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }}/spring-tools
+ DOWNLOAD_URL_ROOT: https://cdn.spring.io/spring-tools
+
jobs:
update-aggregate-update-sites:
@@ -22,16 +30,6 @@ jobs:
- name: Timestamp
id: timestamp
run: echo "date=`echo $(($(date +%s%N) / 1000000))`" >> $GITHUB_OUTPUT
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Generate and Upload Aggregate Update Sites Data
id: gen-aggregate-sites
env:
@@ -40,16 +38,16 @@ jobs:
run: |
echo "Akamai S3 Aggregate Update Sites Creation..."
invalid_urls=""
- site_url="https://cdn.spring.io/spring-tools/release/TOOLS/sts4-language-server-integrations/${{ inputs.version }}"
+ site_url="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4-language-server-integrations/${{ inputs.version }}"
${{ github.workspace }}/.github/scripts/generate-composite-site-files.sh ${{ steps.timestamp.outputs.date }} $site_url
cat ./compositeArtifacts.xml
cat ./compositeContent.xml
- aws s3 cp ./compositeArtifacts.xml s3://tools-spring-io/release/TOOLS/sts4-language-server-integrations/
- invalid_urls+="https://cdn.spring.io/spring-tools/release/TOOLS/sts4-language-server-integrations/compositeArtifacts.xml "
- aws s3 cp ./compositeContent.xml s3://tools-spring-io/release/TOOLS/sts4-language-server-integrations/
- invalid_urls+="https://cdn.spring.io/spring-tools/release/TOOLS/sts4-language-server-integrations/compositeContent.xml "
- aws s3 cp ./p2.index s3://tools-spring-io/release/TOOLS/sts4-language-server-integrations/
- invalid_urls+="https://cdn.spring.io/spring-tools/release/TOOLS/sts4-language-server-integrations/p2.index"
+ aws s3 cp ./compositeArtifacts.xml s3://$AWS_S3_BUCKET/release/TOOLS/sts4-language-server-integrations/
+ invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4-language-server-integrations/compositeArtifacts.xml "
+ aws s3 cp ./compositeContent.xml s3://$AWS_S3_BUCKET/release/TOOLS/sts4-language-server-integrations/
+ invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4-language-server-integrations/compositeContent.xml "
+ aws s3 cp ./p2.index s3://$AWS_S3_BUCKET/release/TOOLS/sts4-language-server-integrations/
+ invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4-language-server-integrations/p2.index"
echo "invalid_urls=$invalid_urls" >> $GITHUB_OUTPUT
purge_cache:
diff --git a/.github/workflows/akamai-clear-cache-s3-dir.yml b/.github/workflows/akamai-clear-cache-s3-dir.yml
index df2f5c9c5..a3a88577e 100644
--- a/.github/workflows/akamai-clear-cache-s3-dir.yml
+++ b/.github/workflows/akamai-clear-cache-s3-dir.yml
@@ -1,4 +1,4 @@
-name: Akamai Purge Cache for Directory
+name: Cloudflare Purge Cache for Directory
on:
workflow_call:
@@ -13,36 +13,38 @@ on:
description: S3 URL
required: false
type: string
- default: s3://tools-spring-io/snapshot/TOOLS/sts4/nightly/e4.30/
+ default: /snapshot/TOOLS/sts4/nightly/e4.32/
+
+env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }}
+ AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }}/spring-tools
+ DOWNLOAD_URL_ROOT: https://cdn.spring.io/spring-tools
jobs:
clear-cache-s3-dir:
- runs-on: [self-hosted]
+ runs-on: ubuntu-latest
steps:
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Prepare URLs
id: prepare-urls
run: |
- urls=`aws s3 ls ${{ inputs.s3-url }} --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e 's/^[ \t]*/https:\/\/cdn.spring.io\/spring-tools\//' | paste -sd' ' -`
+ ESCAPED_REPLACE_URL=$(printf '%s\n' "$DOWNLOAD_URL_ROOT/" | sed -e 's/[\/&]/\\&/g')
+ sed_pattern="s/^[ \t]*/$ESCAPED_REPLACE_URL/"
+ urls=`aws s3 ls s3://$AWS_S3_BUCKET${{ inputs.s3-url }} --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e "$sed_pattern" | paste -sd' ' -`
echo "urls=$urls" >> $GITHUB_OUTPUT
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
sparse-checkout: |
.github
- - uses: ./.github/actions/akamai-purge-osx
+ - uses: ./.github/actions/cloudflare-purge
name: Invalidate Cache for URLs
env:
- EDGERC: ${{ secrets.EDGERC }}
+ CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
+ CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
with:
- command: invalidate
urls: ${{ steps.prepare-urls.outputs.urls }}
+ cloudflare_zone_id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
+ cloudflare_cache_token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/build-vscode-extension.yml b/.github/workflows/build-vscode-extension.yml
index 6bba71c1b..765d1bf99 100644
--- a/.github/workflows/build-vscode-extension.yml
+++ b/.github/workflows/build-vscode-extension.yml
@@ -16,6 +16,14 @@ on:
permissions:
contents: write
+env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }}
+ AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }}/spring-tools
+ DOWNLOAD_URL_ROOT: https://cdn.spring.io/spring-tools
+
jobs:
build-vscode-extension:
runs-on: ubuntu-latest
@@ -35,16 +43,6 @@ jobs:
run: |
${{ github.workspace }}/.github/scripts/build-vscode-extension.sh ${{ inputs.extension-name }} ${{ inputs.dist }}
ls ./vsix
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@v4
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Upload Release
id: upload-release
if: ${{ inputs.dist == 'release' }}
@@ -55,10 +53,10 @@ jobs:
cd $pwd
vsix_file=`ls ./vsix | head -n 1`
echo "VSIX file to upload ${vsix_file}"
- s3_path=vscode-extensions/${{ inputs.extension-name }}/$base_version/${{ inputs.dist }}
+ s3_path=${{ inputs.dist }}/vscode-extensions/${{ inputs.extension-name }}/$base_version
echo "S3 path: ${s3_path}"
- aws s3 rm s3://tools-spring-io/$s3_path/ --recursive
- aws s3 cp ./vsix/$vsix_file s3://tools-spring-io/$s3_path/$vsix_file --no-progress
+ aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive
+ aws s3 cp ./vsix/$vsix_file s3://$AWS_S3_BUCKET/$s3_path/$vsix_file --no-progress
echo "version=$base_version" >> $GITHUB_OUTPUT
echo "s3_url=https://cdn.spring.io/spring-tools/$s3_path/$vsix_file" >> $GITHUB_OUTPUT
- id: tools-team-slack
diff --git a/.github/workflows/eclipse-ls-extensions-build.yml b/.github/workflows/eclipse-ls-extensions-build.yml
index c3ca21adf..6d6b99879 100644
--- a/.github/workflows/eclipse-ls-extensions-build.yml
+++ b/.github/workflows/eclipse-ls-extensions-build.yml
@@ -25,6 +25,13 @@ on:
description: version of sts4 ls extensions
required: false
type: string
+env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }}
+ AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }}/spring-tools
+ DOWNLOAD_URL_ROOT: https://cdn.spring.io/spring-tools
jobs:
@@ -74,24 +81,14 @@ jobs:
else
./mvnw --batch-mode clean install -P${{ inputs.eclipse_profile }} -P${{ inputs.build_type }} $sts4_ls_version_param -Pgitactions -Pgpg.sign -Dmaven.test.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore
fi
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Upload P2 Repo to S3 and Akamai
id: upload-p2-to-akamai
run: |
p2_path=`cat ${{ github.workspace }}/eclipse-language-servers/org.springframework.tooling.ls.integration.repository/target/s3-p2-repo-dist-path.txt`
echo "p2_path=$p2_path" >> $GITHUB_OUTPUT
echo "P2 path: ${p2_path}"
- aws s3 rm s3://tools-spring-io/${p2_path}/ --recursive
- aws s3 cp ${{ github.workspace }}/eclipse-language-servers/org.springframework.tooling.ls.integration.repository/target/repository/ s3://tools-spring-io/${p2_path}/ --recursive --no-progress
+ aws s3 rm s3://$AWS_S3_BUCKET/${p2_path}/ --recursive
+ aws s3 cp ${{ github.workspace }}/eclipse-language-servers/org.springframework.tooling.ls.integration.repository/target/repository/ s3://$AWS_S3_BUCKET/${p2_path}/ --recursive --no-progress
# - name: Verify Uploaded P2 Repo
# id: verify-p2-on-akamai
# run: |
@@ -106,7 +103,7 @@ jobs:
if: ${{ inputs.build_type != 'snapshot' }}
id: compute-invalid-urls
run: |
- invalid_urls=`aws s3 ls s3://tools-spring-io/${{ steps.upload-p2-to-akamai.outputs.p2_path }}/ --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e 's/^[ \t]*/https:\/\/cdn.spring.io\/spring-tools\//' | paste -sd' ' -`
+ invalid_urls=`aws s3 ls s3://$AWS_S3_BUCKET/${{ steps.upload-p2-to-akamai.outputs.p2_path }}/ --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e 's/^[ \t]*/https:\/\/cdn.spring.io\/spring-tools\//' | paste -sd' ' -`
echo "invalid_urls=$invalid_urls" >> $GITHUB_OUTPUT
- name: Verify Eclipse LS Extensions on e433
if: ${{ inputs.build_type == 'snapshot' }}
diff --git a/.github/workflows/gen-nighly-downloads.yml b/.github/workflows/gen-nighly-downloads.yml
index 9ee186075..4fedf8874 100644
--- a/.github/workflows/gen-nighly-downloads.yml
+++ b/.github/workflows/gen-nighly-downloads.yml
@@ -3,47 +3,46 @@ name: Generate Nightly Downloads HTML
# configure manual trigger
on:
workflow_dispatch:
+env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }}
+ AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }}/spring-tools
+ DOWNLOAD_URL_ROOT: https://cdn.spring.io/spring-tools
jobs:
gen_html:
runs-on: ubuntu-latest
steps:
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Update Nightly Distro Downloads page
run: |
- dist_path="snapshot/STS4/nightly/dist/e4.28"
- s3_url=s3://tools-spring-io/${dist_path}/
- downloads_html="sts4-nightly-e4.28.html"
+ dist_path="snapshot/STS4/nightly/dist/e4.32"
+ s3_url=s3://$AWS_S3_BUCKET/${dist_path}/
+ downloads_html="sts4-nightly-e4.32.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`
echo '' >> $downloads_html
+ s3_url_prefix="s3://${AWS_S3_BUCKET}"
+ s3_url_prefix_length=${#s3_url_prefix}
for file in $files
do
- if [[ "$file" =~ ^"s3://tools-spring-io" ]]; then
- download_url=https://cdn.spring.io/spring-tools${file:20}
+ if [[ "$file" =~ ^"${s3_url_prefix}" ]]; then
+ download_url=${DOWNLOAD_URL_ROOT}${file:$s3_url_prefix_length}
filename=${file:${#s3_url}}
echo ' - '${filename}'
' >> $downloads_html
fi
done
echo '
' >> $downloads_html
cat ./$downloads_html
- aws s3 mv ./$downloads_html s3://tools-spring-io/snapshot/STS4/ --dryrun
+ aws s3 mv ./$downloads_html s3://$AWS_S3_BUCKET/snapshot/STS4/ --dryrun
files=`aws s3 ls ${s3_url}`
for file in $files
do
echo "file: ${file}"
url="${s3_url}${file}"
echo "url: ${url}"
- if [[ "$file" =~ ^"s3://tools-spring-io" ]]; then
- download_url=https://cdn.spring.io/spring-tools${file:20}
+ if [[ "$file" =~ ^"s3://${AWS_S3_BUCKET}" ]]; then
+ download_url=${DOWNLOAD_URL_ROOT}${file:20}
filename=${file:${#s3_url}}
echo ' '${filename}'' >> $downloads_html
fi
diff --git a/.github/workflows/gh-hosted-eclipse-distro-build.yml b/.github/workflows/gh-hosted-eclipse-distro-build.yml
index 8d6ee5b15..465a3f168 100644
--- a/.github/workflows/gh-hosted-eclipse-distro-build.yml
+++ b/.github/workflows/gh-hosted-eclipse-distro-build.yml
@@ -27,6 +27,14 @@ on:
default: '17'
type: string
+env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }}
+ AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }}/spring-tools
+ DOWNLOAD_URL_ROOT: https://cdn.spring.io/spring-tools
+
jobs:
eclipse-distro-build:
@@ -85,24 +93,13 @@ jobs:
p2_path=`cat ${{ github.workspace }}/eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/s3-p2-repo-dist-path.txt`
echo "dist_path=$dist_path" >> $GITHUB_OUTPUT
echo "p2_path=$p2_path" >> $GITHUB_OUTPUT
- - name: Cloudgate S3 Configuration
- if: always()
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Upload P2 Repo Build Artifacts
run: |
cd eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target
p2_path=${{ steps.s3-paths.outputs.p2_path }}
echo "P2 path: ${p2_path}"
- aws s3 rm s3://tools-spring-io/$p2_path/ --recursive
- aws s3 cp ./repository/ s3://tools-spring-io/$p2_path/ --recursive --no-progress
+ aws s3 rm s3://$AWS_S3_BUCKET/$p2_path/ --recursive
+ aws s3 cp ./repository/ s3://$AWS_S3_BUCKET/$p2_path/ --recursive --no-progress
- name: Upload Linux Distro Build Artifacts
run: |
cd eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/products
@@ -125,20 +122,20 @@ jobs:
dist_path=${{ steps.s3-paths.outputs.dist_path }}
ls spring-tool-suite-4*linux*.tar.gz*
echo "Removing old Linux .tar.gz files from Akamai s3..."
- aws s3 rm s3://tools-spring-io/$dist_path --recursive --exclude "*" --include "spring-tool-suite-4*linux*.tar.gz*" --exclude "*/*"
+ aws s3 rm s3://$AWS_S3_BUCKET/$dist_path --recursive --exclude "*" --include "spring-tool-suite-4*linux*.tar.gz*" --exclude "*/*"
echo "Uploading new Linux .tar.gz files to Akamai s3..."
- aws s3 cp . s3://tools-spring-io/$dist_path --recursive --exclude "*" --include "spring-tool-suite-4*linux*.tar.gz*" --exclude "*/*" --no-progress
+ aws s3 cp . s3://$AWS_S3_BUCKET/$dist_path --recursive --exclude "*" --include "spring-tool-suite-4*linux*.tar.gz*" --exclude "*/*" --no-progress
- name: Update Nightly Distro Downloads page
if: ${{ inputs.build_type == 'snapshot' }}
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..."
id=${{ inputs.eclipse_profile }}-${{ inputs.build_type }}-${{ github.run_id }}
- aws s3 cp ${{ github.workspace }}/eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/products s3://tools-spring-io/sts4-distro-ci-temp/$id --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip" --include "spring-tool-suite-4*macosx*.tar.gz" --exclude "*/*" --no-progress
+ aws s3 cp ${{ github.workspace }}/eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/products s3://$AWS_S3_BUCKET/sts4-distro-ci-temp/$id --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip" --include "spring-tool-suite-4*macosx*.tar.gz" --exclude "*/*" --no-progress
outputs:
id: ${{ inputs.eclipse_profile }}-${{ inputs.build_type }}-${{ github.run_id }}
dist_path: ${{ steps.s3-paths.outputs.dist_path }}
@@ -153,22 +150,12 @@ jobs:
with:
sparse-checkout: |
.github
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 3600
- role-skip-session-tagging: true
- name: Download Win Zips from S3 for Signing
run: |
rm -f spring-tool-suite-4*win*.zip*
rm -f spring-tool-suite-4*win*.self-extracting.jar*
ls
- aws s3 mv s3://tools-spring-io/sts4-distro-ci-temp/${{ needs.eclipse-distro-build.outputs.id }} . --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip*" --exclude "*/*"
+ aws s3 mv s3://$AWS_S3_BUCKET/sts4-distro-ci-temp/${{ needs.eclipse-distro-build.outputs.id }} . --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip*" --exclude "*/*"
- name: Sign EXE within zip files
id: sign
env:
@@ -188,16 +175,16 @@ jobs:
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 Akamai..."
- aws s3 rm s3://tools-spring-io/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip*" --include "spring-tool-suite-4*win*.self-extracting.jar*" --exclude "*/*"
+ aws s3 rm s3://$AWS_S3_BUCKET/${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 Akamai..."
- aws s3 mv . s3://tools-spring-io/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip*" --include "spring-tool-suite-4*win*.self-extracting.jar*" --exclude "*/*" --no-progress
+ aws s3 mv . s3://$AWS_S3_BUCKET/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip*" --include "spring-tool-suite-4*win*.self-extracting.jar*" --exclude "*/*" --no-progress
- name: Update Nightly Distro Downloads page
if: ${{ inputs.build_type == 'snapshot' }}
run: |
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:
@@ -238,21 +225,11 @@ jobs:
- name: Install appdmg
run: |
npm install -g appdmg
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Download OSX tar.gz files from S3 for Signing/Notarization
run: |
rm -rf *macosx*
ls
- aws s3 mv s3://tools-spring-io/sts4-distro-ci-temp/${{ needs.eclipse-distro-build.outputs.id }} . --recursive --exclude "*" --include "spring-tool-suite-4*macosx*.tar.gz" --exclude "*/*" --no-progress
+ aws s3 mv s3://$AWS_S3_BUCKET/sts4-distro-ci-temp/${{ needs.eclipse-distro-build.outputs.id }} . --recursive --exclude "*" --include "spring-tool-suite-4*macosx*.tar.gz" --exclude "*/*" --no-progress
- name: Sign .app, Create and Sign DMG
env:
MACOS_CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }}
@@ -287,16 +264,6 @@ jobs:
echo "Failed Notarization"
exit 1
fi
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}_upload
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Update DMG files on S3
id: update-s3
run: |
@@ -304,16 +271,16 @@ jobs:
echo "Processing S3 update..."
ls spring-tool-suite-4*macosx*.dmg*
echo "Removing old dmg files from Akamai..."
- aws s3 rm s3://tools-spring-io/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*macosx*.dmg*" --exclude "*/*"
+ aws s3 rm s3://$AWS_S3_BUCKET/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*macosx*.dmg*" --exclude "*/*"
echo "Uploading new dmg files to Akamai..."
- aws s3 mv . s3://tools-spring-io/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*macosx*.dmg*" --exclude "*/*" --no-progress
+ aws s3 mv . s3://$AWS_S3_BUCKET/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*macosx*.dmg*" --exclude "*/*" --no-progress
- name: Update Nightly Distro Downloads page
if: ${{ inputs.build_type == 'snapshot' && always() }}
run: |
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: |
@@ -322,60 +289,37 @@ jobs:
purge_cache:
needs: [ eclipse-distro-build, sign-win-distros, sign-osx-distros ]
if: ${{ always() && inputs.build_type != 'snapshot' && contains(join(needs.*.result, ','), 'success')}}
- runs-on: [self-hosted]
- steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- with:
- sparse-checkout: |
- .github
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- - name: Collect URLs on Akamai to Purge
- id: collect-urls
- run: |
- dist_urls=`aws s3 ls s3://tools-spring-io/${{ needs.eclipse-distro-build.outputs.dist_path }} --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e 's/^[ \t]*/https:\/\/cdn.spring.io\/spring-tools\//' | paste -sd' ' -`
- p2_urls=`aws s3 ls s3://tools-spring-io/${{ needs.eclipse-distro-build.outputs.p2_path }} --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e 's/^[ \t]*/https:\/\/cdn.spring.io\/spring-tools\//' | paste -sd' ' -`
- urls="${dist_urls} ${p2_urls}"
- echo "urls=$urls" >> $GITHUB_OUTPUT
- - uses: ./.github/actions/akamai-purge-osx
- name: Invalidate URLs
- env:
- EDGERC: ${{ secrets.EDGERC }}
- with:
- command: invalidate
- urls: ${{ steps.collect-urls.outputs.urls }}
-
- cleanup:
- needs: [ eclipse-distro-build, sign-win-distros, sign-osx-distros ]
- if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
sparse-checkout: |
.github
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
+ - name: Collect URLs on Akamai to Purge
+ id: collect-urls
+ run: |
+ ESCAPED_REPLACE_URL=$(printf '%s\n' "$DOWNLOAD_URL_ROOT/" | sed -e 's/[\/&]/\\&/g')
+ sed_pattern="s/^[ \t]*/$ESCAPED_REPLACE_URL/"
+ dist_urls=`aws s3 ls s3://$AWS_S3_BUCKET/${{ needs.eclipse-distro-build.outputs.dist_path }} --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e "$sed_pattern" | paste -sd' ' -`
+ p2_urls=`aws s3 ls s3://$AWS_S3_BUCKET/${{ needs.eclipse-distro-build.outputs.p2_path }} --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e "$sed_pattern" | paste -sd' ' -`
+ urls="${dist_urls} ${p2_urls}"
+ echo "urls=$urls" >> $GITHUB_OUTPUT
+ - uses: ./.github/actions/cloudflare-purge
+ name: Invalidate URLs
with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
+ urls: ${{ steps.collect-urls.outputs.urls }}
+ cloudflare_zone_id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
+ cloudflare_cache_token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
+
+ cleanup:
+ needs: [ eclipse-distro-build, sign-win-distros, sign-osx-distros ]
+ if: ${{ always() }}
+ runs-on: ubuntu-latest
+ steps:
- name: Remove Temp Build Artifacts from S3
id: cleanup-s3-temp-storage
run: |
- aws s3 rm s3://tools-spring-io/sts4-distro-ci-temp --recursive --exclude "*" --include "${{ needs.eclipse-distro-build.outputs.id }}/*"
+ aws s3 rm s3://$AWS_S3_BUCKET/sts4-distro-ci-temp --recursive --exclude "*" --include "${{ needs.eclipse-distro-build.outputs.id }}/*"
notify-failure:
needs: [ eclipse-distro-build, sign-win-distros, sign-osx-distros, cleanup, purge_cache ]
diff --git a/.github/workflows/remove-tcp-dump.yml b/.github/workflows/remove-tcp-dump.yml
deleted file mode 100644
index 6f4ff2865..000000000
--- a/.github/workflows/remove-tcp-dump.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: Clear out TCP Dump storage
-
-on:
- workflow_dispatch:
-
-jobs:
- cleanup:
- runs-on: ubuntu-latest
- steps:
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- - name: Remove TCP Dump Files from S3
- id: cleanup-s3-tcp-dump-storage
- run: |
- aws s3 rm s3://tools-spring-io/tcpdump --recursive --exclude "*" --include "*.pcap"
-
diff --git a/.github/workflows/snapshot-eclipse-ls-extensions-build.yml b/.github/workflows/snapshot-eclipse-ls-extensions-build.yml
index 299dbcece..34be0ef97 100644
--- a/.github/workflows/snapshot-eclipse-ls-extensions-build.yml
+++ b/.github/workflows/snapshot-eclipse-ls-extensions-build.yml
@@ -16,4 +16,5 @@ jobs:
with:
eclipse_profile: 'e431'
build_type: 'snapshot'
+ skip_tests: true
secrets: inherit
diff --git a/.github/workflows/test-r2-bucket.yml b/.github/workflows/test-r2-bucket.yml
index 8f7c975c8..c6b4c05a9 100644
--- a/.github/workflows/test-r2-bucket.yml
+++ b/.github/workflows/test-r2-bucket.yml
@@ -15,9 +15,11 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_TEST_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_TEST_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: https://13b7012a66b58025c7f02b7c7c597d13.r2.cloudflarestorage.com
run: |
file="upload-test.txt"
echo 'Upload test file' > $file
cat $file
aws s3 mv ./$file s3://cdn-test-spring-io/sts-test/$file
+ aws s3 ls s3://cdn-test-spring-io/sts-test/ --recursive | awk '{$1=$2=$3=""; print $0}'
aws s3 rm s3://cdn-test-spring-io/sts-test/$file
diff --git a/.github/workflows/upload-nightly-downloads-page.yml b/.github/workflows/upload-nightly-downloads-page.yml
index 5fdf48d6a..f02a6ab4f 100644
--- a/.github/workflows/upload-nightly-downloads-page.yml
+++ b/.github/workflows/upload-nightly-downloads-page.yml
@@ -8,6 +8,14 @@ on:
paths:
- 'eclipse-distribution/common/html/nightly-distributions.html'
+env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }}
+ AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }}/spring-tools
+ DOWNLOAD_URL_ROOT: https://cdn.spring.io/spring-tools
+
jobs:
upload-nightly-downloads-s3-cache:
@@ -18,19 +26,9 @@ jobs:
sparse-checkout: |
.github
eclipse-distribution/common/html
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Upload nightly-distributions.html
run: |
echo "Removing old nightly-distributions.html from s3..."
- aws s3 rm s3://tools-spring-io/snapshot/STS4/nightly-distributions.html
+ aws s3 rm s3://$AWS_S3_BUCKET/snapshot/STS4/nightly-distributions.html
echo "Uploading new nightly-distributions.html to s3..."
- aws s3 cp ./eclipse-distribution/common/html/nightly-distributions.html s3://tools-spring-io/snapshot/STS4/nightly-distributions.html --no-progress
+ aws s3 cp ./eclipse-distribution/common/html/nightly-distributions.html s3://$AWS_S3_BUCKET/snapshot/STS4/nightly-distributions.html --no-progress
diff --git a/.github/workflows/wipe-out-temp-build-artifacts.yml b/.github/workflows/wipe-out-temp-build-artifacts.yml
index 2187bcfb3..bdd7de3df 100644
--- a/.github/workflows/wipe-out-temp-build-artifacts.yml
+++ b/.github/workflows/wipe-out-temp-build-artifacts.yml
@@ -8,22 +8,19 @@ on:
# branches:
# - 'main'
+env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
+ AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }}
+ AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }}/spring-tools
+
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- - name: Cloudgate S3 Configuration
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
- with:
- aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
- aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
- role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
- role-session-name: ${{ github.run_id }}
- aws-region: us-east-1
- role-duration-seconds: 900
- role-skip-session-tagging: true
- name: Remove Temp Build Artifacts from S3
id: cleanup-s3-temp-storage
run: |
- aws s3 rm s3://tools-spring-io/sts4-distro-ci-temp --recursive --exclude "*" --include "*.zip"
+ aws s3 rm s3://${AWS_S#_BUCKET}/sts4-distro-ci-temp --recursive --exclude "*" --include "*.zip"