From 365fb66059e90647a85c3930718989418f3803b7 Mon Sep 17 00:00:00 2001 From: Yeliz Henden Date: Mon, 10 Feb 2025 09:56:06 +0000 Subject: [PATCH 1/2] CLOUDP-296432: Update IPA release workflow to dump to production s3 --- .github/workflows/release-IPA-metrics.yml | 68 ++++++++++------------- 1 file changed, 29 insertions(+), 39 deletions(-) diff --git a/.github/workflows/release-IPA-metrics.yml b/.github/workflows/release-IPA-metrics.yml index d07cd94eeb..3ca189a704 100644 --- a/.github/workflows/release-IPA-metrics.yml +++ b/.github/workflows/release-IPA-metrics.yml @@ -15,18 +15,6 @@ jobs: name: Release IPA Validation Metrics runs-on: ubuntu-latest steps: - - name: Fetch OAS file from Dev Branch - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - with: - ref: 'dev' - sparse-checkout: openapi/v2.json - - - name: Upload OAS file - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 - with: - name: oas-dev - path: openapi/v2.json - - name: Checkout repository (scripts) uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 with: @@ -44,30 +32,32 @@ jobs: - name: Install npm dependencies run: npm install - - name: Download oas-dev - uses: actions/download-artifact@v4 - with: - name: oas-dev - - - name: Run Metric Collection Job - working-directory: tools/spectral/ipa/metrics/scripts - run: node runMetricCollection.js "${{ github.workspace }}/v2.json" - - - name: Dump Metric Collection Job Data to S3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.IPA_S3_BUCKET_DW_STAGING_USERNAME }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.IPA_S3_BUCKET_DW_STAGING_PASSWORD }} - S3_BUCKET_PREFIX: ${{ secrets.IPA_S3_BUCKET_DW_STAGING_PREFIX }} - working-directory: tools/spectral/ipa/metrics/scripts - run: node dataDump.js - - failure-handler: - name: Failure Handler - needs: [ release-IPA-metrics ] - if: ${{ failure() }} - uses: ./.github/workflows/failure-handler.yml - with: - env: 'dev' - release_name: "IPA Metrics" - secrets: - jira_api_token: ${{ secrets.JIRA_API_TOKEN }} + - name: Fetch OAS file from Dev Branch + run: curl -L -O "https://raw.githubusercontent.com/mongodb/openapi/refs/heads/dev/openapi/v2.json" + working-directory: ${{ github.workspace }} + + - name: Verify downloaded file + run: ls -lh + +# - name: Run Metric Collection Job +# working-directory: tools/spectral/ipa/metrics/scripts +# run: node runMetricCollection.js "${{ github.workspace }}/v2.json" +# +# - name: Dump Metric Collection Job Data to S3 +# env: +# AWS_ACCESS_KEY_ID: ${{ secrets.IPA_S3_BUCKET_DW_PROD_USERNAME }} +# AWS_SECRET_ACCESS_KEY: ${{ secrets.IPA_S3_BUCKET_DW_PROD_PASSWORD }} +# S3_BUCKET_PREFIX: ${{ secrets.IPA_S3_BUCKET_DW_PROD_PREFIX }} +# working-directory: tools/spectral/ipa/metrics/scripts +# run: node dataDump.js +# +# failure-handler: +# name: Failure Handler +# needs: [ release-IPA-metrics ] +# if: ${{ failure() }} +# uses: ./.github/workflows/failure-handler.yml +# with: +# env: 'dev' +# release_name: "IPA Metrics" +# secrets: +# jira_api_token: ${{ secrets.JIRA_API_TOKEN }} From c07ed2207f978f4609380778b7f653cb440b48e2 Mon Sep 17 00:00:00 2001 From: Yeliz Henden Date: Mon, 10 Feb 2025 09:56:06 +0000 Subject: [PATCH 2/2] CLOUDP-296432: Update IPA release workflow to dump to production s3 --- .github/workflows/release-IPA-metrics.yml | 25 ++++++----------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-IPA-metrics.yml b/.github/workflows/release-IPA-metrics.yml index d07cd94eeb..c4535b7820 100644 --- a/.github/workflows/release-IPA-metrics.yml +++ b/.github/workflows/release-IPA-metrics.yml @@ -15,18 +15,6 @@ jobs: name: Release IPA Validation Metrics runs-on: ubuntu-latest steps: - - name: Fetch OAS file from Dev Branch - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - with: - ref: 'dev' - sparse-checkout: openapi/v2.json - - - name: Upload OAS file - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 - with: - name: oas-dev - path: openapi/v2.json - - name: Checkout repository (scripts) uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 with: @@ -44,10 +32,9 @@ jobs: - name: Install npm dependencies run: npm install - - name: Download oas-dev - uses: actions/download-artifact@v4 - with: - name: oas-dev + - name: Fetch OAS file from Dev Branch + run: curl -L -O "https://raw.githubusercontent.com/mongodb/openapi/refs/heads/dev/openapi/v2.json" + working-directory: ${{ github.workspace }} - name: Run Metric Collection Job working-directory: tools/spectral/ipa/metrics/scripts @@ -55,9 +42,9 @@ jobs: - name: Dump Metric Collection Job Data to S3 env: - AWS_ACCESS_KEY_ID: ${{ secrets.IPA_S3_BUCKET_DW_STAGING_USERNAME }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.IPA_S3_BUCKET_DW_STAGING_PASSWORD }} - S3_BUCKET_PREFIX: ${{ secrets.IPA_S3_BUCKET_DW_STAGING_PREFIX }} + AWS_ACCESS_KEY_ID: ${{ secrets.IPA_S3_BUCKET_DW_PROD_USERNAME }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.IPA_S3_BUCKET_DW_PROD_PASSWORD }} + S3_BUCKET_PREFIX: ${{ secrets.IPA_S3_BUCKET_DW_PROD_PREFIX }} working-directory: tools/spectral/ipa/metrics/scripts run: node dataDump.js