From f56edfbe440a908492a849962c23efc3fc967da8 Mon Sep 17 00:00:00 2001 From: aboyko Date: Wed, 2 Aug 2023 09:56:57 -0400 Subject: [PATCH] GHA: Agg Update Site work --- .../scripts/generate-composite-site-files.sh | 34 +++++++++++++++++++ .../snapshot-eclipse-ls-extensions-build.yml | 10 +++--- .../update-aggregate-update-sites.yml | 32 +++++++++++++++++ 3 files changed, 71 insertions(+), 5 deletions(-) create mode 100755 .github/scripts/generate-composite-site-files.sh create mode 100644 .github/workflows/update-aggregate-update-sites.yml diff --git a/.github/scripts/generate-composite-site-files.sh b/.github/scripts/generate-composite-site-files.sh new file mode 100755 index 000000000..631dd3110 --- /dev/null +++ b/.github/scripts/generate-composite-site-files.sh @@ -0,0 +1,34 @@ +val=$1 +url=$2 + +rm -f ./compositeArtifacts.xml +rm -f ./compositeContent.xml +rm -f ./p2.index + +echo "" >> compositeArtifacts.xml +echo "" >> compositeArtifacts.xml +echo "" >> compositeArtifacts.xml +ehco " " >> compositeArtifacts.xml +echo " " >> compositeArtifacts.xml +echo " " >> compositeArtifacts.xml +echo " " >> compositeArtifacts.xml +echo " " >> compositeArtifacts.xml +echo " " >> compositeArtifacts.xml +ehco "" >> compositeArtifacts.xml + +echo "" >> compositeContent.xml +echo "" >> compositeContent.xml +echo "> compositeContent.xml +echo " type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>" >> compositeContent.xml +echo " " >> compositeContent.xml +echo " " >> compositeContent.xml +echo " " >> compositeContent.xml +echo " " >> compositeContent.xml +echo " " >> compositeContent.xml +echo " " >> compositeContent.xml +echo "" >> 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 diff --git a/.github/workflows/snapshot-eclipse-ls-extensions-build.yml b/.github/workflows/snapshot-eclipse-ls-extensions-build.yml index f398da152..c0307c642 100644 --- a/.github/workflows/snapshot-eclipse-ls-extensions-build.yml +++ b/.github/workflows/snapshot-eclipse-ls-extensions-build.yml @@ -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: diff --git a/.github/workflows/update-aggregate-update-sites.yml b/.github/workflows/update-aggregate-update-sites.yml new file mode 100644 index 000000000..fd6f2526d --- /dev/null +++ b/.github/workflows/update-aggregate-update-sites.yml @@ -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 \ No newline at end of file