diff --git a/.github/actions/notify-deployoholics/action.yml b/.github/actions/notify-deployoholics/action.yml index 3c0ecab9dbb..a618be85c68 100644 --- a/.github/actions/notify-deployoholics/action.yml +++ b/.github/actions/notify-deployoholics/action.yml @@ -1,26 +1,25 @@ --- name: Notify Deployoholics -description: Send a message to the Deployoholics Wire channel. +description: Send a message to the Deployoholics Wire channel using the Deployoholics webhook and token. inputs: - webhook-url: - description: Deployoholics Wire webhook URL. - required: true text: description: Wire message text. required: true - status: - description: Wire notification status. - required: false - default: failure + deployoholics-webhook-url: + description: Wire webhook URL to notify Deployoholics conversation. + required: true + deployoholics-token: + description: GitHub Actions token to notify Deployoholics conversation. + required: true runs: using: composite steps: - name: Send Wire notification - uses: 8398a7/action-slack@293f8dc0f9731ac35321056641cdef895f4f65f8 - env: - SLACK_WEBHOOK_URL: ${{ inputs.webhook-url }} + uses: wireapp/github-app/.github/actions/notify-wire@3a9c9d7e71d96d391951429c1d1bfbbee081ed8c with: - status: ${{ inputs.status }} - text: ${{ inputs.text }} + webhook-url: ${{ inputs.deployoholics-webhook-url }} + token: ${{ inputs.deployoholics-token }} + text: |- + ${{ inputs.text }} diff --git a/.github/workflows/e2e-tests-nightly.yml b/.github/workflows/e2e-tests-nightly.yml deleted file mode 100644 index 2f1986653b6..00000000000 --- a/.github/workflows/e2e-tests-nightly.yml +++ /dev/null @@ -1,130 +0,0 @@ -name: E2E Tests Nightly - -on: - # Scheduled nightly testing is paused until the canonical Edge URL and TLS - # configuration are available. Beta validation continues through Release WebApp; - # this workflow remains available for manual regression runs. - workflow_dispatch: - inputs: - webappUrl: - description: Webapp URL to run the tests against - required: true - type: choice - options: - - https://wire-webapp-dev.zinfra.io/ - - https://wire-webapp-qa.zinfra.io/ - -# Only allow one instance of this workflow to run per branch at a time -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -jobs: - e2e_tests: - name: Run e2e tests - uses: ./.github/workflows/e2e-tests.yml - with: - webappUrl: ${{ inputs.webappUrl }} - secrets: - OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} - WIRE_E2E_TEST_BOT_WEBHOOK_URL: ${{ secrets.WIRE_E2E_TEST_BOT_WEBHOOK_URL }} - - report: - name: Report test results - if: ${{ !cancelled() }} - runs-on: ubuntu-24.04 - needs: e2e_tests - - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - with: - persist-credentials: false - - - name: Add repository Yarn wrapper to PATH - run: echo "$GITHUB_WORKSPACE/bin" >> "$GITHUB_PATH" - - - name: Setup Node.js - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f - with: - node-version-file: '.nvmrc' - cache: 'yarn' - - - name: Download report - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c - with: - artifact-ids: ${{ needs.e2e_tests.outputs.reportArtifactId }} - path: apps/webapp/playwright-report - pattern: '**/report.json' - - - name: Generate report description - id: generate-description - run: | - REPORT_FILE="apps/webapp/playwright-report/report.json" - if [ ! -f "$REPORT_FILE" ]; then - echo "Error: File '$REPORT_FILE' not found!" - exit 1 - fi - - FAILED=$(jq '.stats.unexpected' "$REPORT_FILE") - MESSAGE=$(jq -c ' - # Recursively find all objects that have a non-empty "specs" array - # Capture the suite title and prepend it to the test title - [.. | objects | select(has("specs") and (.specs | length > 0)) | .title as $suite | .specs[] | .title as $title | .tests[] | {title: ($suite + " > " + $title), status: .status}] as $tests | - - # Calculate aggregates - ($tests | length) as $total | - ($tests | map(select(.status == "expected")) | length) as $passed | - ($tests | map(select(.status == "unexpected")) | length) as $failed | - ($tests | map(select(.status == "flaky")) | length) as $flaky | - ($tests | map(select(.status == "skipped")) | length) as $skipped | - - # Generate unique lists for failed and flaky tests - ($tests | map(select(.status == "unexpected")) | map(" āŒ " + .title) | unique | join("\n")) as $failed_list | - ($tests | map(select(.status == "flaky")) | map(" āš ļø " + .title) | unique | join("\n")) as $flaky_list | - - # Construct the final formatted message - "šŸ“‹ **Playwright Test Run Summary**\n" + - "Build URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n" + - "======================================\n" + - "**Total Tests:** \($total)\n" + - "āœ… **Passed:** \($passed)\n" + - "āŒ **Failed:** \($failed)\n" + - "āš ļø **Flaky:** \($flaky)\n" + - (if $skipped > 0 then "ā­ļø **Skipped:** \($skipped)\n" else "" end) + - "======================================\n" + - (if $failed > 0 then "\nāŒ **Failed Tests:**\n\($failed_list)\n" else "" end) + - (if $flaky > 0 then "\nāš ļø **Flaky Tests:**\n\($flaky_list)\n" else "" end) - ' $REPORT_FILE) - - echo "failed_tests=$FAILED" >> $GITHUB_OUTPUT - echo "report_message=$MESSAGE" >> $GITHUB_OUTPUT - - - name: Upload report to Testiny - continue-on-error: true - env: - TESTINY_API_KEY: ${{ secrets.TESTINY_API_KEY }} - TESTINY_TEST_PLAN_ID: 105 # 105 is the id of the "Regression" test plan within Testiny - DESCRIPTION: ${{ steps.generate-description.outputs.report_message }} - run: | - # Extract description from json format so it can be quoted correctly - RAW_DESCRIPTION=$(echo "$DESCRIPTION" | jq -r '.') - - node ./apps/webapp/test/e2e_tests/scripts/uploadTestReport.ts \ - --runName="Regression $(date +'%m/%d/%Y - %H:%M')" \ - --testPlanId="$TESTINY_TEST_PLAN_ID" \ - --description="$RAW_DESCRIPTION" \ - --reportPath="./apps/webapp/playwright-report/report.json" - - - name: Notify on Wire about failed tests - if: ${{ !cancelled() && steps.generate-description.outputs.failed_tests > 0 }} - uses: 8398a7/action-slack@293f8dc0f9731ac35321056641cdef895f4f65f8 - continue-on-error: true - env: - SLACK_WEBHOOK_URL: ${{ secrets.WIRE_E2E_TEST_BOT_WEBHOOK_URL }} - with: - status: custom - custom_payload: | - { - "text": ${{ steps.generate-description.outputs.report_message }}, - } diff --git a/.github/workflows/precommit-e2e-tests.yml b/.github/workflows/precommit-e2e-tests.yml index 7bd299a10ac..bb9850fafe4 100644 --- a/.github/workflows/precommit-e2e-tests.yml +++ b/.github/workflows/precommit-e2e-tests.yml @@ -102,6 +102,7 @@ jobs: WEBTEAM_AWS_ACCESS_KEY_ID: ${{ secrets.WEBTEAM_AWS_ACCESS_KEY_ID }} WEBTEAM_AWS_SECRET_ACCESS_KEY: ${{ secrets.WEBTEAM_AWS_SECRET_ACCESS_KEY }} WIRE_DEPLOYOHOLICS_WEBHOOK_URL: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + WIRE_DEPLOYOHOLICS_TOKEN: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} run_e2e_tests: name: Playwright Critical Flow diff --git a/.github/workflows/precommit-slot-run.yml b/.github/workflows/precommit-slot-run.yml index 973aead1174..97dc38c96fe 100644 --- a/.github/workflows/precommit-slot-run.yml +++ b/.github/workflows/precommit-slot-run.yml @@ -45,6 +45,8 @@ on: required: true WIRE_DEPLOYOHOLICS_WEBHOOK_URL: required: false + WIRE_DEPLOYOHOLICS_TOKEN: + required: false TESTINY_API_KEY: required: false outputs: @@ -215,8 +217,8 @@ jobs: - name: Announce failed critical flow uses: ./.github/actions/notify-deployoholics with: - webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} - status: failure + deployoholics-webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + deployoholics-token: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} text: | āŒ Playwright Critical Flow failed āŒ diff --git a/.github/workflows/publish-main.yml b/.github/workflows/publish-main.yml index 863196c081b..bccd4c98565 100644 --- a/.github/workflows/publish-main.yml +++ b/.github/workflows/publish-main.yml @@ -700,8 +700,8 @@ jobs: - name: Announce main delivery failure uses: ./.github/actions/notify-deployoholics with: - webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} - status: failure + deployoholics-webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + deployoholics-token: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} text: | āŒ Main delivery failed āŒ **Main commit:** ${{ github.sha }} diff --git a/.github/workflows/redeploy-production-from-tag.yml b/.github/workflows/redeploy-production-from-tag.yml index 321dd88919d..2c5c6307076 100644 --- a/.github/workflows/redeploy-production-from-tag.yml +++ b/.github/workflows/redeploy-production-from-tag.yml @@ -238,8 +238,8 @@ jobs: - name: Announce production redeploy failure uses: ./.github/actions/notify-deployoholics with: - webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} - status: failure + deployoholics-webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + deployoholics-token: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} text: | āŒ Production redeploy failed for tag ${{ needs.validate_request.outputs.tag }} āŒ **Triggered by:** ${{ github.actor }} diff --git a/.github/workflows/release-webapp.yml b/.github/workflows/release-webapp.yml index e59aa8f524a..555d01d674a 100644 --- a/.github/workflows/release-webapp.yml +++ b/.github/workflows/release-webapp.yml @@ -579,8 +579,8 @@ jobs: - name: Announce successful Beta release uses: ./.github/actions/notify-deployoholics with: - webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} - status: success + deployoholics-webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + deployoholics-token: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} text: | āœ… WebApp Beta release successfully deployed āœ… @@ -822,8 +822,8 @@ jobs: - name: Announce successful release E2E gate uses: ./.github/actions/notify-deployoholics with: - webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} - status: success + deployoholics-webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + deployoholics-token: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} text: | āœ… Release E2E system gate passed āœ… @@ -1339,8 +1339,8 @@ jobs: - name: Announce successful Production release uses: ./.github/actions/notify-deployoholics with: - webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} - status: success + deployoholics-webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + deployoholics-token: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} text: | āœ… WebApp Production release successfully completed āœ… @@ -1535,8 +1535,8 @@ jobs: - name: Announce release failure uses: ./.github/actions/notify-deployoholics with: - webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} - status: failure + deployoholics-webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + deployoholics-token: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} text: | ${{ env.POST_PRODUCTION_SYNCHRONIZATION_FAILURE == 'true' && 'āš ļø Production release succeeded; WebApp version synchronization bookkeeping is incomplete āš ļø' || 'āŒ WebApp release failed āŒ' }} diff --git a/.github/workflows/repair-production-distribution.yml b/.github/workflows/repair-production-distribution.yml index 3d7e7146503..fadb6bcf69e 100644 --- a/.github/workflows/repair-production-distribution.yml +++ b/.github/workflows/repair-production-distribution.yml @@ -129,8 +129,8 @@ jobs: - name: Announce Production repair failure uses: ./.github/actions/notify-deployoholics with: - webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} - status: failure + deployoholics-webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + deployoholics-token: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} text: | āŒ Production distribution repair failed āŒ diff --git a/.github/workflows/rollback-production.yml b/.github/workflows/rollback-production.yml index b4f626ea352..70a64c6f0af 100644 --- a/.github/workflows/rollback-production.yml +++ b/.github/workflows/rollback-production.yml @@ -323,8 +323,8 @@ jobs: - name: Announce Production rollback failure uses: ./.github/actions/notify-deployoholics with: - webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} - status: failure + deployoholics-webhook-url: ${{ secrets.WIRE_DEPLOYOHOLICS_WEBHOOK_URL }} + deployoholics-token: ${{ secrets.WIRE_DEPLOYOHOLICS_TOKEN }} text: | Production rollback failed for tag ${{ needs.validate_request.outputs.production_tag || inputs.production_tag }} Webapp version: ${{ needs.build_artifact.outputs.artifact_version || 'unavailable' }}