GHA: Agg Update Site work

This commit is contained in:
aboyko
2023-08-02 09:56:57 -04:00
parent 6a2a212295
commit f56edfbe44
3 changed files with 71 additions and 5 deletions

View File

@@ -0,0 +1,34 @@
val=$1
url=$2
rm -f ./compositeArtifacts.xml
rm -f ./compositeContent.xml
rm -f ./p2.index
echo "<?xml version='1.0' encoding='UTF-8'?>" >> compositeArtifacts.xml
echo "<?compositeArtifactRepository version='1.0.0'?>" >> compositeArtifacts.xml
echo "<repository name='Spring Tool Suite 4" >> compositeArtifacts.xml
echo " type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>" >> compositeArtifacts.xml
ehco " <properties size='1'>" >> compositeArtifacts.xml
echo " <property name='p2.timestamp' value='${val}'/>" >> compositeArtifacts.xml
echo " </properties>" >> compositeArtifacts.xml
echo " <children size='1'>" >> compositeArtifacts.xml
echo " <child location='${url}'/>" >> compositeArtifacts.xml
echo " </children>" >> compositeArtifacts.xml
ehco "</repository>" >> compositeArtifacts.xml
echo "<?xml version='1.0' encoding='UTF-8'?>" >> compositeContent.xml
echo "<?compositeMetadataRepository version='1.0.0'?>" >> compositeContent.xml
echo "<repository name='Spring Tool Suite 4'" >> compositeContent.xml
echo " type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>" >> compositeContent.xml
echo " <properties size='1'>" >> compositeContent.xml
echo " <property name='p2.timestamp' value='1${val}'/>" >> compositeContent.xml
echo " </properties>" >> compositeContent.xml
echo " <children size='1'>" >> compositeContent.xml
echo " <child location='${url}'/>" >> compositeContent.xml
echo " </children>" >> compositeContent.xml
echo "</repository>" >> compositeContent.xml
echo "version=1" >> p2.index
echo "metadata.repository.factory.order=compositeContent.xml,!" >> p2.index
echo "artifact.repository.factory.order=compositeArtifacts.xml,!" >> p2.index

View File

@@ -4,12 +4,12 @@ concurrency:
group: eclipse-ls-extension-snapshot
cancel-in-progress: true
#on:
# workflow_dispatch:
on:
push:
branches:
- 'main'
workflow_dispatch:
#on:
# push:
# branches:
# - 'main'
jobs:
eclipse-ls-extensions:

View File

@@ -0,0 +1,32 @@
name: Update Aggregate Update Sites
on:
workflow_dispatch:
inputs:
version:
description: Version suffix in S3
required: true
type: string
jobs:
update-aggregate-update-sites:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
sparse-checkout: |
.github
- name: Generate and Upload Aggregate Update Sites Data
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
run: |
dirs=`aws s3 cp s3://dist.springsource.com/release/TOOLS/sts4/update/$version . --recursive --include "*" --exclude "*/*" --dryrun`
for dir in $dirs
do
echo $dir
done