Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing slack messaging workflow #11660

Merged
merged 11 commits into from
Aug 19, 2024
29 changes: 27 additions & 2 deletions .github/workflows/extensions-compatibility-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
path: cypress/screenshots

# Slack message with outcome - success
- name: Slack message in workflow success
env:
SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jordojordo marked this conversation as resolved.
Show resolved Hide resolved
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 }}
jordojordo marked this conversation as resolved.
Show resolved Hide resolved
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
Loading