From c945112e3fc6c272887f85bf191af17765d3f77a Mon Sep 17 00:00:00 2001 From: Adonis Puente <60629070+adonispuente@users.noreply.github.com> Date: Tue, 14 Jan 2025 10:14:22 -0600 Subject: [PATCH] fix(sentry): Remove unused workflow/Fix sentry flow #1341 --- .github/workflows/sentry.yml | 58 ----------------------------------- .github/workflows/webpack.yml | 12 -------- fec.config.js | 24 +++++++-------- 3 files changed, 12 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/sentry.yml diff --git a/.github/workflows/sentry.yml b/.github/workflows/sentry.yml deleted file mode 100644 index 97695899e..000000000 --- a/.github/workflows/sentry.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: sentryWorkflow - -on: - workflow_dispatch: - inputs: - commit_hash: - description: 'The commit hash (or branch/tag) to build' - required: true - default: 'master' - -jobs: - createSentryRelease: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - ref: ${{ github.event.inputs.commit_hash }} - - - name: Install dependencies - env: - SENTRY_RELEASE: advisor-${{ github.event.inputs.commit_hash }} - run: npm ci - - - name: Build - env: - SENTRY_RELEASE: advisor-${{ github.event.inputs.commit_hash }} - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - run: npm run build --if-present - - - name: Create a Sentry.io release - uses: getsentry/action-release@v1 - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - with: - tagName: ${{ github.event.inputs.commit_hash }} - releaseNamePrefix: advisor - environment: master - sourcemaps: 'dist/sourcemaps' - - - name: Upload debug files to Sentry - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - run: | - curl -sL https://sentry.io/get-cli/ | bash # Install Sentry CLI - export SENTRY_RELEASE=advisor-${{ github.event.inputs.commit_hash }} - sentry-cli upload-dif \ - --include-sources \ - --org $SENTRY_ORG \ - --project $SENTRY_PROJECT \ - --release $SENTRY_RELEASE \ - dist dist/sourcemaps diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index fbe3f7777..a8a738b83 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -29,15 +29,3 @@ jobs: SENTRY_ORG: ${{ secrets.SENTRY_ORG }} SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} run: npm run build --if-present - - - name: Create a Sentry.io release - uses: getsentry/action-release@v1 - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - with: - tagName: ${{ github.event.inputs.commit_hash }} - releaseNamePrefix: advisor - environment: master - sourcemaps: 'dist/sourcemaps' diff --git a/fec.config.js b/fec.config.js index 6b5016475..25544bd89 100644 --- a/fec.config.js +++ b/fec.config.js @@ -14,12 +14,12 @@ module.exports = { authToken: process.env.SENTRY_AUTH_TOKEN, org: 'red-hat-it', project: 'advisor-rhel', - _experiments: { - moduleMetadata: ({ release }) => ({ - dsn: 'https://f8eb44de949e487e853185c09340f3cf@o490301.ingest.us.sentry.io/4505397435367424', - release, - }), - }, + moduleMetadata: ({ release }) => ({ + dsn: 'https://f8eb44de949e487e853185c09340f3cf@o490301.ingest.us.sentry.io/4505397435367424', + release, + org: 'red-hat-it', + project: 'advisor-rhel', + }), }), ] : [ @@ -27,12 +27,12 @@ module.exports = { sentryWebpackPlugin({ org: 'red-hat-it', project: 'advisor-rhel', - _experiments: { - moduleMetadata: ({ release }) => ({ - dsn: 'https://f8eb44de949e487e853185c09340f3cf@o490301.ingest.us.sentry.io/4505397435367424', - release, - }), - }, + moduleMetadata: ({ release }) => ({ + dsn: 'https://f8eb44de949e487e853185c09340f3cf@o490301.ingest.us.sentry.io/4505397435367424', + release, + org: 'red-hat-it', + project: 'advisor-rhel', + }), }), ]), ],