diff --git a/.github/workflows/extensions-compatibility-tests.yaml b/.github/workflows/extensions-compatibility-tests.yaml index b7494a2d0d5..e8a2e50ce9b 100644 --- a/.github/workflows/extensions-compatibility-tests.yaml +++ b/.github/workflows/extensions-compatibility-tests.yaml @@ -57,10 +57,35 @@ jobs: TEST_SKIP: setup GREP_TAGS: ${{ matrix.role.tag }}+${{ matrix.features[0] }} --@jenkins ${{ matrix.role.tag }}+${{ matrix.features[0] }} --@jenkins TEST_USERNAME: ${{ matrix.role.username }} - + + # Upload to sorry cypress in case of failure - name: Upload screenshots uses: actions/upload-artifact@v3 if: ${{ failure() }} with: name: ${{github.run_number}}-${{github.run_attempt}}-extensions-compatibility-tests-screenshots-${{ matrix.role.tag }}+${{ matrix.features[0] }} - path: cypress/screenshots \ No newline at end of file + path: cypress/screenshots + + # Slack message with outcome - success + - name: Slack message in workflow success + env: + SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + if: success() + shell: bash + run: | + curl -X POST \ + -H "Content-type: application/json; charset=utf-8" \ + --data '{"name": "${{ matrix.rancherEnv[0] }} - image:${{ matrix.rancherEnv[1] }} - ${{ matrix.features[1] }}", "status": "Workflow succedded! ✅", "workflow_run": ${{ github.run_id }} }' \ + $SLACK_URL + + # Slack message with outcome - failure + - name: Slack message in workflow failure + env: + SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() + shell: bash + run: | + curl -X POST \ + -H "Content-type: application/json; charset=utf-8" \ + --data '{"name": "${{ matrix.rancherEnv[0] }} - image:${{ matrix.rancherEnv[1] }} - ${{ matrix.features[1] }}", "status": "Workflow failed! 🆘", "workflow_run": ${{ github.run_id }} }' \ + $SLACK_URL \ No newline at end of file