From faf5394ab55a2401847cdccf2834b4d0679bf085 Mon Sep 17 00:00:00 2001 From: devinxl Date: Thu, 6 Mar 2025 11:43:47 +0800 Subject: [PATCH] feat: Remove upload static files to S3 --- .github/.e2e-deploy/dcellar-web-ui-e2e-with-mainnet.yaml | 2 -- .github/.e2e-deploy/dcellar-web-ui-e2e-with-qa.yaml | 2 -- .github/.e2e-deploy/dcellar-web-ui-e2e-with-testnet.yaml | 2 -- .github/workflows/dcellar-web-ui-e2e-cicd.yml | 2 +- .github/workflows/dcellar-web-ui-e2e-housekeeping.yaml | 2 +- .github/workflows/dcellar-web-ui-prod-mainnet-cicd.yml | 9 +-------- .github/workflows/dcellar-web-ui-prod-testnet-cicd.yml | 9 +-------- .github/workflows/dcellar-web-ui-qa-cicd.yml | 8 +------- 8 files changed, 5 insertions(+), 31 deletions(-) diff --git a/.github/.e2e-deploy/dcellar-web-ui-e2e-with-mainnet.yaml b/.github/.e2e-deploy/dcellar-web-ui-e2e-with-mainnet.yaml index be62015..67cdd33 100644 --- a/.github/.e2e-deploy/dcellar-web-ui-e2e-with-mainnet.yaml +++ b/.github/.e2e-deploy/dcellar-web-ui-e2e-with-mainnet.yaml @@ -21,8 +21,6 @@ nodereal-app: configMapsMountPath: /app/conf/ containers: env: - - name: NEXT_PUBLIC_STATIC_HOST - value: '' - name: NEXT_PUBLIC_ENV value: 'mainnet' - name: NEXT_PUBLIC_GOOGLE_ANALYTICS_ID diff --git a/.github/.e2e-deploy/dcellar-web-ui-e2e-with-qa.yaml b/.github/.e2e-deploy/dcellar-web-ui-e2e-with-qa.yaml index 452f20e..dbf878c 100644 --- a/.github/.e2e-deploy/dcellar-web-ui-e2e-with-qa.yaml +++ b/.github/.e2e-deploy/dcellar-web-ui-e2e-with-qa.yaml @@ -21,8 +21,6 @@ nodereal-app: configMapsMountPath: /app/conf/ containers: env: - - name: NEXT_PUBLIC_STATIC_HOST - value: '' - name: NEXT_PUBLIC_ENV value: 'qa' - name: NEXT_PUBLIC_GOOGLE_ANALYTICS_ID diff --git a/.github/.e2e-deploy/dcellar-web-ui-e2e-with-testnet.yaml b/.github/.e2e-deploy/dcellar-web-ui-e2e-with-testnet.yaml index f8a2603..7a3a43c 100644 --- a/.github/.e2e-deploy/dcellar-web-ui-e2e-with-testnet.yaml +++ b/.github/.e2e-deploy/dcellar-web-ui-e2e-with-testnet.yaml @@ -21,8 +21,6 @@ nodereal-app: configMapsMountPath: /app/conf/ containers: env: - - name: NEXT_PUBLIC_STATIC_HOST - value: '' - name: NEXT_PUBLIC_ENV value: 'testnet' - name: NEXT_PUBLIC_GOOGLE_ANALYTICS_ID diff --git a/.github/workflows/dcellar-web-ui-e2e-cicd.yml b/.github/workflows/dcellar-web-ui-e2e-cicd.yml index a6d813e..1b6f4a2 100644 --- a/.github/workflows/dcellar-web-ui-e2e-cicd.yml +++ b/.github/workflows/dcellar-web-ui-e2e-cicd.yml @@ -20,7 +20,7 @@ on: jobs: CI-CD: - runs-on: [qa-cicd-runners-large] + runs-on: [ubuntu-latest] steps: - name: Get current date id: start diff --git a/.github/workflows/dcellar-web-ui-e2e-housekeeping.yaml b/.github/workflows/dcellar-web-ui-e2e-housekeeping.yaml index 0a3a908..29934a4 100644 --- a/.github/workflows/dcellar-web-ui-e2e-housekeeping.yaml +++ b/.github/workflows/dcellar-web-ui-e2e-housekeeping.yaml @@ -8,7 +8,7 @@ on: required: true jobs: remove-e2e-test-deployment: - runs-on: [qa-cicd-runners] + runs-on: [ubuntu-latest] steps: - name: Install Helm uses: azure/setup-helm@v4.2.0 diff --git a/.github/workflows/dcellar-web-ui-prod-mainnet-cicd.yml b/.github/workflows/dcellar-web-ui-prod-mainnet-cicd.yml index 22e4889..16cfeb4 100644 --- a/.github/workflows/dcellar-web-ui-prod-mainnet-cicd.yml +++ b/.github/workflows/dcellar-web-ui-prod-mainnet-cicd.yml @@ -31,7 +31,7 @@ on: jobs: CI: - runs-on: [prod-cicd-runners] + runs-on: [ubuntu-latest] steps: - name: Checkout 🛎️ uses: actions/checkout@v4 @@ -85,13 +85,6 @@ jobs: docker push ${IMAGE_NAME} echo "image_id=$IMAGE_NAME" >> $GITHUB_OUTPUT - - name: Upload Static Files to Prod S3 Bucket - env: - APP_NAME: ${{ inputs.app_name }} - STATIC_BUCKET: ${{ secrets.PROD_MAINNET_S3_BUCKET }} - run: | - aws s3 cp apps/${APP_NAME}/.next/static s3://${STATIC_BUCKET}/static/${APP_NAME}/_next/static --recursive --cache-control "public, max-age=31536000" - aws s3 cp apps/${APP_NAME}/public s3://${STATIC_BUCKET}/static/${APP_NAME} --recursive --cache-control "public, max-age=31536000" - name: Checkout GitOps Config Repository to get diff commit 🛎️ uses: actions/checkout@v4 with: diff --git a/.github/workflows/dcellar-web-ui-prod-testnet-cicd.yml b/.github/workflows/dcellar-web-ui-prod-testnet-cicd.yml index 8d85ec2..3c7aaf4 100644 --- a/.github/workflows/dcellar-web-ui-prod-testnet-cicd.yml +++ b/.github/workflows/dcellar-web-ui-prod-testnet-cicd.yml @@ -31,7 +31,7 @@ on: jobs: CI: - runs-on: [prod-cicd-runners] + runs-on: [ubuntu-latest] steps: - name: Checkout 🛎️ uses: actions/checkout@v4 @@ -81,13 +81,6 @@ jobs: DOCKER_BUILDKIT=1 docker build -f apps/${APP_NAME}/Dockerfile . -t ${IMAGE_NAME} docker push ${IMAGE_NAME} echo "image_id=$IMAGE_NAME" >> $GITHUB_OUTPUT - - name: Upload Static Files to Prod S3 Bucket - env: - APP_NAME: ${{ inputs.app_name }} - STATIC_BUCKET: ${{ secrets.PROD_S3_BUCKET }} - run: | - aws s3 cp apps/${APP_NAME}/.next/static s3://${STATIC_BUCKET}/static/${APP_NAME}/_next/static --recursive --cache-control "public, max-age=31536000" - aws s3 cp apps/${APP_NAME}/public s3://${STATIC_BUCKET}/static/${APP_NAME} --recursive --cache-control "public, max-age=31536000" - name: Checkout GitOps Repository for Diff Commits 🛎️ uses: actions/checkout@v4 with: diff --git a/.github/workflows/dcellar-web-ui-qa-cicd.yml b/.github/workflows/dcellar-web-ui-qa-cicd.yml index fdc0a6e..44c3f3e 100644 --- a/.github/workflows/dcellar-web-ui-qa-cicd.yml +++ b/.github/workflows/dcellar-web-ui-qa-cicd.yml @@ -106,13 +106,6 @@ jobs: DOCKER_BUILDKIT=1 docker build -f apps/${APP_NAME}/Dockerfile . -t ${IMAGE_NAME} docker push ${IMAGE_NAME} echo "image_id=$IMAGE_NAME" >> $GITHUB_OUTPUT - - name: Upload Static Files to QA S3 Bucket - env: - APP_NAME: ${{ inputs.app_name }} - STATIC_BUCKET: ${{ secrets.QA_S3_BUCKET }} - run: | - aws s3 cp apps/${APP_NAME}/.next/static s3://${STATIC_BUCKET}/static/${APP_NAME}/_next/static --recursive --cache-control "public, max-age=31536000" --metadata '{"Cache-Control":"max-age=31536000"}' - aws s3 cp apps/${APP_NAME}/public s3://${STATIC_BUCKET}/static/${APP_NAME} --recursive --cache-control "public, max-age=31536000" --metadata '{"Cache-Control":"max-age=31536000"}' - name: Checkout GitOps Repository for Diff Commits 🛎️ uses: actions/checkout@v4 with: @@ -248,6 +241,7 @@ jobs: Preview Url: ${{ inputs.preview_url }} Build Id: ${{ steps.output_commit_sha.outputs.commit_sha }} reactions: hooray, rocket + Job-Failure-Feedback: runs-on: [qa-cicd-runners] if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }}