From beb3473d4e8d467fa25e3c9fcc1dee3131b68e54 Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:10:01 +0700 Subject: [PATCH] Move out from cloudflare r2 to aws s3 (#2596) * Move out from cloudflare r2 to aws s3 * Remove clean cloudflare jobs --------- Co-authored-by: Hien To --- .github/workflows/clean-cloudflare-r2.yml | 31 -------------------- extensions/monitoring-extension/download.bat | 2 +- extensions/monitoring-extension/package.json | 2 +- 3 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/clean-cloudflare-r2.yml diff --git a/.github/workflows/clean-cloudflare-r2.yml b/.github/workflows/clean-cloudflare-r2.yml deleted file mode 100644 index fcab30fc4..000000000 --- a/.github/workflows/clean-cloudflare-r2.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Clean Cloudflare R2 nightly build artifacts older than 10 days" -on: - schedule: - - cron: "0 0 * * *" # every day at 00:00 - workflow_dispatch: - -jobs: - clean-cloudflare-r2: - runs-on: ubuntu-latest - environment: production - steps: - - name: install-aws-cli-action - uses: unfor19/install-aws-cli-action@v1 - - name: Delete object older than 10 days - run: | - # Get the list of objects in the 'latest' folder - OBJECTS=$(aws s3api list-objects --bucket ${{ secrets.CLOUDFLARE_R2_BUCKET_NAME }} --prefix "latest/" --query 'Contents[?LastModified<`'$(date -d "$current_date -10 days" -u +"%Y-%m-%dT%H:%M:%SZ")'`].{Key: Key}' --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | jq -c .) - - # Create a JSON file for the delete operation - echo "{\"Objects\": $OBJECTS, \"Quiet\": false}" > delete.json - - # Delete the objects - echo q | aws s3api delete-objects --bucket ${{ secrets.CLOUDFLARE_R2_BUCKET_NAME }} --delete file://delete.json --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com - - # Remove the JSON file - rm delete.json - env: - AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: auto - AWS_EC2_METADATA_DISABLED: "true" diff --git a/extensions/monitoring-extension/download.bat b/extensions/monitoring-extension/download.bat index f1cf8b7ea..14e0aadd9 100644 --- a/extensions/monitoring-extension/download.bat +++ b/extensions/monitoring-extension/download.bat @@ -1,2 +1,2 @@ @echo off -.\node_modules\.bin\download https://delta.jan.ai/vulkaninfoSDK.exe -o ./bin \ No newline at end of file +.\node_modules\.bin\download https://catalog.jan.ai/vulkaninfoSDK.exe -o ./bin \ No newline at end of file diff --git a/extensions/monitoring-extension/package.json b/extensions/monitoring-extension/package.json index 0268fb11c..3cbb14dab 100644 --- a/extensions/monitoring-extension/package.json +++ b/extensions/monitoring-extension/package.json @@ -11,7 +11,7 @@ "download-artifacts": "run-script-os && cpx \"bin/**\" \"dist/bin\"", "download-artifacts:darwin": "echo 'No artifacts to download for darwin'", "download-artifacts:win32": "download.bat", - "download-artifacts:linux": "download https://delta.jan.ai/vulkaninfo -o ./bin && chmod +x ./bin/vulkaninfo", + "download-artifacts:linux": "download https://catalog.jan.ai/vulkaninfo -o ./bin && chmod +x ./bin/vulkaninfo", "build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install" }, "exports": {