Skip to content

Commit 953e35b

Browse files
authored
chore(e2e): Add slack message on e2e test failure (#3070)
* chore(e2e): Add slack message on test failure * chore(e2e): Remove deprecated variable * CR: only run in boundary-ui
1 parent e138b06 commit 953e35b

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/test-e2e-admin-ui.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,13 @@ jobs:
189189
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
190190
export ENOS_VAR_aws_ssh_private_key_path=~/.ssh/github_enos && \
191191
enos scenario destroy --timeout 60m0s --chdir ./support/src/${{matrix.folder_name}}/enos ${{matrix.enos_scenario}} builder:local
192+
193+
- name: Send Slack message on failure
194+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
195+
if: ${{ failure() && github.repository == 'hashicorp/boundary-ui' }}
196+
with:
197+
method: chat.postMessage
198+
token: ${{ secrets.SLACK_BOT_TOKEN }}
199+
payload: |
200+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
201+
text: ":x: admin ui e2e tests failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.repository }}:${{ github.event.ref }}"

.github/workflows/test-e2e-desktop.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ jobs:
7979
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
8080
export ENOS_VAR_aws_ssh_private_key_path=~/.ssh/github_enos && \
8181
export ENOS_VAR_boundary_license="${{ secrets.BOUNDARY_ENT_LICENSE }}" && \
82-
export ENOS_VAR_boundary_docker_image_name=hashicorp/boundary-enterprise:latest && \
8382
export ENOS_VAR_boundary_docker_image_file=/tmp/boundary-enterprise.zip && \
8483
enos scenario launch --timeout 60m0s --chdir ./support/src/boundary-enterprise/enos e2e_ui_docker_ent builder:crt
8584
@@ -111,3 +110,13 @@ jobs:
111110
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
112111
export ENOS_VAR_aws_ssh_private_key_path=~/.ssh/github_enos && \
113112
enos scenario destroy --timeout 60m0s --chdir ./support/src/boundary-enterprise/enos e2e_ui_docker_ent builder:crt
113+
114+
- name: Send Slack message on failure
115+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
116+
if: ${{ failure() && github.repository == 'hashicorp/boundary-ui' }}
117+
with:
118+
method: chat.postMessage
119+
token: ${{ secrets.SLACK_BOT_TOKEN }}
120+
payload: |
121+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
122+
text: ":x: desktop client e2e tests failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.repository }}:${{ github.event.ref }}"

0 commit comments

Comments
 (0)