GHA: Switch p2 urls in poms to cdn.spring.io/spring-tools
This commit is contained in:
@@ -16,6 +16,8 @@ jobs:
|
||||
|
||||
update-aggregate-update-sites:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
invalid_urls: ${{ steps.gen-aggregate-sites.outputs.invalid_urls }}
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
|
||||
with:
|
||||
@@ -35,6 +37,7 @@ jobs:
|
||||
role-duration-seconds: 900
|
||||
role-skip-session-tagging: true
|
||||
- name: Generate and Upload Aggregate Update Sites Data
|
||||
id: gen-aggregate-sites
|
||||
env:
|
||||
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
||||
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
|
||||
@@ -66,6 +69,7 @@ jobs:
|
||||
echo "Akamai S3 Aggregate Update Sites Creation..."
|
||||
dirs=`aws s3 ls s3://tools-spring-io/release/TOOLS/sts4/update/${{ inputs.version }}/`
|
||||
pattern='^e[0-9]+.[0-9]+/$'
|
||||
invalid_urls=""
|
||||
for dir in $dirs
|
||||
do
|
||||
if [[ "$dir" =~ $pattern ]]; then
|
||||
@@ -77,13 +81,31 @@ jobs:
|
||||
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+="s3://tools-spring-io/release/TOOLS/sts4/update/latest/compositeArtifacts.xml "
|
||||
aws s3 cp ./compositeContent.xml s3://tools-spring-io/release/TOOLS/sts4/update/latest/
|
||||
invalid_urls+="s3://tools-spring-io/release/TOOLS/sts4/update/latest/compositeContent.xml "
|
||||
aws s3 cp ./p2.index s3://tools-spring-io/release/TOOLS/sts4/update/latest/
|
||||
invalid_urls+="s3://tools-spring-io/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+="s3://tools-spring-io/release/TOOLS/sts4/update/${dir}/compositeArtifacts.xml "
|
||||
aws s3 mv ./compositeContent.xml s3://tools-spring-io/release/TOOLS/sts4/update/${dir}
|
||||
invalid_urls+="s3://tools-spring-io/release/TOOLS/sts4/update/${dir}/compositeContent.xml "
|
||||
aws s3 mv ./p2.index s3://tools-spring-io/release/TOOLS/sts4/update/${dir}
|
||||
echo "TODO: Purge Cache"
|
||||
invalid_urls+="s3://tools-spring-io/release/TOOLS/sts4/update/${dir}/p2.index "
|
||||
fi
|
||||
done
|
||||
echo "invalid_urls=$invalid_urls" >> $GITHUB_OUTPUT
|
||||
|
||||
purge_cache:
|
||||
needs: [ update-aggregate-update-sites ]
|
||||
runs-on: [self-hosted, macOS]
|
||||
steps:
|
||||
- uses: ./.github/actions/akamai-purge-osx
|
||||
name: Invalidate URLs
|
||||
env:
|
||||
EDGERC: ${{ secrets.EDGERC }}
|
||||
with:
|
||||
command: invalidate
|
||||
urls: ${{ needs.update-aggregate-update-sites.outputs.invalid_urls }}
|
||||
|
||||
@@ -12,6 +12,8 @@ jobs:
|
||||
|
||||
update-aggregate-update-sites:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
invalid_urls: ${{ steps.gen-aggregate-sites.outputs.invalid_urls }}
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
|
||||
with:
|
||||
@@ -31,6 +33,7 @@ jobs:
|
||||
role-duration-seconds: 900
|
||||
role-skip-session-tagging: true
|
||||
- name: Generate and Upload Aggregate Update Sites Data
|
||||
id: gen-aggregate-sites
|
||||
env:
|
||||
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
||||
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
|
||||
@@ -45,11 +48,27 @@ jobs:
|
||||
aws s3 cp ./p2.index s3://dist.springsource.com/release/TOOLS/sts4-language-server-integrations/ --acl public-read
|
||||
${{ github.workspace }}/.github/scripts/clear-s3-caches.sh release/TOOLS/sts4-language-server-integrations
|
||||
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 }}"
|
||||
${{ 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+="s3://tools-spring-io/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+="s3://tools-spring-io/release/TOOLS/sts4-language-server-integrations/compositeContent.xml "
|
||||
aws s3 cp ./p2.index s3://tools-spring-io/release/TOOLS/sts4-language-server-integrations/
|
||||
echo "TODO: purge cache!"
|
||||
invalid_urls+="s3://tools-spring-io/release/TOOLS/sts4-language-server-integrations/p2.index"
|
||||
echo "invalid_urls=$invalid_urls" >> $GITHUB_OUTPUT
|
||||
|
||||
purge_cache:
|
||||
needs: [ update-aggregate-update-sites ]
|
||||
runs-on: [self-hosted, macOS]
|
||||
steps:
|
||||
- uses: ./.github/actions/akamai-purge-osx
|
||||
name: Invalidate URLs
|
||||
env:
|
||||
EDGERC: ${{ secrets.EDGERC }}
|
||||
with:
|
||||
command: invalidate
|
||||
urls: ${{ needs.update-aggregate-update-sites.outputs.invalid_urls }}
|
||||
|
||||
@@ -296,7 +296,7 @@ jobs:
|
||||
|
||||
purge_cache:
|
||||
needs: [ eclipse-distro-build, sign-win-distros, sign-osx-distros ]
|
||||
if: ${{ always() && inputs.build_type == 'snapshot' && contains(join(needs.*.result, ','), 'success')}}
|
||||
if: ${{ always() && inputs.build_type != 'snapshot' && contains(join(needs.*.result, ','), 'success')}}
|
||||
runs-on: [self-hosted, macOS]
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
|
||||
|
||||
@@ -6,9 +6,9 @@ concurrency:
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# push:
|
||||
# branches:
|
||||
# - 'main'
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
eclipse-ls-extensions:
|
||||
|
||||
@@ -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://dist.springsource.com/${dist.type}/TOOLS/sts4-language-server-integrations/${sts4-language-servers-version}</sts4-language-servers-p2-repo>
|
||||
<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>
|
||||
|
||||
<tycho-version>4.0.4</tycho-version>
|
||||
<encoding>UTF-8</encoding>
|
||||
@@ -436,7 +436,7 @@
|
||||
<repository>
|
||||
<id>p2-thirdparty-bundles</id>
|
||||
<layout>p2</layout>
|
||||
<url>https://dist.springsource.com/release/TOOLS/third-party/misc-p2-repo/${misc.p2.repo.version}</url>
|
||||
<url>https://cdn.spring.io/spring-tools/release/TOOLS/third-party/misc-p2-repo/${misc.p2.repo.version}</url>
|
||||
</repository>
|
||||
<!-- <repository>
|
||||
<id>egit-github</id>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<repository>
|
||||
<id>sts4-language-servers-snapshot</id>
|
||||
<layout>p2</layout>
|
||||
<url>https://dist.springsource.com/snapshot/TOOLS/sts4-language-servers/nightly/</url>
|
||||
<url>https://cdn.spring.io/spring-tools/snapshot/TOOLS/sts4-language-servers/nightly/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<serverId>s3</serverId>
|
||||
<url>https://dist.springsource.com/release/TOOLS/node-xterm</url>
|
||||
<url>https://cdn.spring.io/spring-tools/release/TOOLS/node-xterm</url>
|
||||
<fromFile>${archive-file}</fromFile>
|
||||
<toFile>${project.basedir}/lib/node-xterm.zip</toFile>
|
||||
</configuration>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<serverId>s3</serverId>
|
||||
<url>https://dist.springsource.com/release/TOOLS/node-xterm</url>
|
||||
<url>https://cdn.spring.io/spring-tools/release/TOOLS/node-xterm</url>
|
||||
<fromFile>${archive-file}</fromFile>
|
||||
<toFile>${project.basedir}/lib/node-xterm.zip</toFile>
|
||||
</configuration>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<serverId>s3</serverId>
|
||||
<url>https://dist.springsource.com/release/TOOLS/node-xterm</url>
|
||||
<url>https://cdn.spring.io/spring-tools/release/TOOLS/node-xterm</url>
|
||||
<fromFile>${archive-file}</fromFile>
|
||||
<toFile>${project.basedir}/lib/node-xterm.zip</toFile>
|
||||
</configuration>
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
<repository>
|
||||
<id>p2-thirdparty-bundles</id>
|
||||
<layout>p2</layout>
|
||||
<url>https://dist.springsource.com/release/TOOLS/third-party/misc-p2-repo/${misc.p2.repo.version}</url>
|
||||
<url>https://cdn.spring.io/spring-tools/release/TOOLS/third-party/misc-p2-repo/${misc.p2.repo.version}</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<repository>
|
||||
<id>p2-thirdparty-bundles</id>
|
||||
<layout>p2</layout>
|
||||
<url>https://dist.springsource.com/release/TOOLS/third-party/misc-p2-repo/${misc.p2.repo.version}</url>
|
||||
<url>https://cdn.spring.io/spring-tools/release/TOOLS/third-party/misc-p2-repo/${misc.p2.repo.version}</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user