Skip to content

Commit 5cd093f

Browse files
Adding deployment status update on smoke test s/f
1 parent ee5ee8d commit 5cd093f

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/infrastructure.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ on:
2929
outputs:
3030
fqdn:
3131
description: The fully qualified domain name of the deployed service
32-
value: ${{ jobs.deploy.steps.outputs.fqdn }}
32+
value: ${{ jobs.deploy.outputs.fqdn }}
3333
deployment_id:
3434
description: The GitHub deployment ID
35-
value: ${{ jobs.deploy.steps.outputs.deployment_id }}
35+
value: ${{ jobs.deploy.outputs.deployment_id }}
3636

3737
env:
3838
AWS_REGION: us-east-2

.github/workflows/smoke_testing.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ jobs:
118118
text:
119119
type: "mrkdwn"
120120
text: "> Check the logs for <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|details>."
121+
- name: Update deployment status (success)
122+
if: success()
123+
uses: chrnorm/deployment-status@v2
124+
with:
125+
token: '${{ github.token }}'
126+
environment-url: "https://${{ inputs.fqdn }}"
127+
state: 'success'
128+
deployment-id: ${{ inputs.deployment_id }}
121129

122130
slackNotificationFailure:
123131
name: Slack Notification (Failure)
@@ -139,4 +147,12 @@ jobs:
139147
- type: "section"
140148
text:
141149
type: "mrkdwn"
142-
text: "> Check the logs for <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|details>."
150+
text: "> Check the logs for <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|details>."
151+
- name: Update deployment status (failure)
152+
if: failure()
153+
uses: chrnorm/deployment-status@v2
154+
with:
155+
token: '${{ github.token }}'
156+
environment-url: "https://${{ inputs.fqdn }}"
157+
state: 'failure'
158+
deployment-id: ${{ inputs.deployment_id }}

0 commit comments

Comments
 (0)