Skip to content

Commit

Permalink
testing slack messaging workflow (#11660)
Browse files Browse the repository at this point in the history
* testing slack messaging workflow

* comment other workflows2

* comment other workflows

* fix issue wf

* add missing webhook url

* adjust wf

* adjust wf

* adjust wf

* adjust wf

* revert triggers on other workflows + add message to slack for extensions compatibility tests

* remove undesired file
  • Loading branch information
aalves08 committed Aug 19, 2024
1 parent 2386076 commit dc7784a
Showing 1 changed file with 27 additions and 2 deletions.
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 }}
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

0 comments on commit dc7784a

Please sign in to comment.