-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: scan docker image * chore: scan docker image * Update publish-docker-images.yaml * Update publish-docker-images.yaml * Update publish-docker-images.yaml * Update publish-docker-images.yaml * Update publish-docker-images.yaml * chore: add pull request conditionals for docker build * fix: conditional * fix: typo * chore: publish to slack on master failure * fix: webhook url * upgrade libssl3 libcrypto3 * set severity to low * fix slack message * update slack error messages * add e2e test status
- Loading branch information
1 parent
883a004
commit 388617b
Showing
4 changed files
with
46 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,33 @@ jobs: | |
tags: | | ||
type=raw,value=master-${{ needs.generate-tags.outputs.tag_date }}-${{ needs.generate-tags.outputs.short_sha }} | ||
type=raw,value=master-latest | ||
notify-slack: | ||
name: Notify Slack | ||
needs: | ||
- publish-docker-image | ||
- generate-tags | ||
- lint | ||
- run-unit-tests | ||
if: always() && (needs.publish-docker-image.result != 'success' || needs.run-unit-tests.result != 'success' || needs.lint.result != 'success' || needs.run-e2e-tests.result != 'success') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify Slack | ||
uses: slackapi/[email protected] | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
with: | ||
payload: | | ||
{ | ||
"unit-test-status": "${{ needs.run-unit-tests.result != 'success' && ':alert: Failure' || ':white_check_mark: Success' }}", | ||
"docker-publish-status": "${{ needs.publish-docker-image.result != 'success' && ':alert: Failure' || ':white_check_mark: Success' }}", | ||
"commit-message": "${{ github.event.head_commit.message }}", | ||
"commit-url": "${{ github.event.head_commit.url }}", | ||
"e2e-test-status": "${{ needs.run-e2e-tests.result != 'success' && ':alert: Failure' || ':white_check_mark: Success' }}", | ||
"branch": "${{ github.ref }}", | ||
"status": "${{ job.status }}", | ||
"repository": "${{ github.repository }}", | ||
"commit-author": "${{ github.event.head_commit.author.name }}", | ||
"lint-status": "${{ needs.lint.result != 'success' && ':alert: Failure' || ':white_check_mark: Success' }}" | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,19 +32,6 @@ jobs: | |
id: unit-test | ||
run: make test | ||
|
||
- name: Post To Slack | ||
if: always() && github.ref == 'refs/heads/master' && (steps.unit-test.outcome == 'failure') | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"source": "GitHub", | ||
"repo": "${{ github.repository}}", | ||
"branch": "${{ github.head_ref || github.ref_name }}", | ||
"message": "unit tests failed on ${{ matrix.os }} with go version ${{ matrix.go-version }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
test_coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters