Chore: Notify in slack when nightly docker image scan fails (#34980)

* Add scan docker image step, when pipeline fails notify in slack channel

* Add star code that generates the yaml file for the fail message to slack

* Fix template message

* Make message more detailed

* Adjust the name of the step
This commit is contained in:
idafurjes
2021-05-31 17:33:22 +02:00
committed by GitHub
parent a23674ef99
commit c62602d941
2 changed files with 29 additions and 1 deletions

View File

@@ -3457,6 +3457,17 @@ steps:
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:latest-ubuntu
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:main-ubuntu
- name: slack-notify-failure
image: plugins/slack
settings:
channel: grafana-backend
template: "Nightly docker image scan job for {{repo.name}} failed: {{build.link}}"
webhook:
from_secret: slack_webhook
when:
status:
- failure
trigger:
cron:
- nightly