Skip to content

Commit

Permalink
Fix: Feed notification (#117)
Browse files Browse the repository at this point in the history
* Fix: Change notification channel to TOD:FeedDeployment:Notification

* Fix: Remove startWith(github.ref ...) from all workflows using notify-mattermost*

* Fix: Add input parameter for notification channel

* Fix: Forward notifcation-channel through container-build-push* workflows

* Fix: Set default channel to todfeeddeploymentnotification

* Update .github/workflows/container-build-push-2nd-gen.yml

Co-authored-by: Jaspar Stach <[email protected]>

* Fix: Remove notify from container-build-push-feed

* Fix: Channel name

* Fix: Readd notify

* Update .github/workflows/notify-mattermost-2nd-gen.yml

Co-authored-by: Jaspar Stach <[email protected]>

* Update container-build-push-feed.yml

* Update .github/workflows/container-build-push-feed.yml

Co-authored-by: Jaspar Stach <[email protected]>

---------

Co-authored-by: Robert Schardt <[email protected]>
Co-authored-by: Jaspar Stach <[email protected]>
Co-authored-by: Robert Schardt <[email protected]>
  • Loading branch information
4 people authored Oct 22, 2024
1 parent c559da7 commit 1b1d879
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/container-build-push-2nd-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ on:
description: "The artifact path to extract the artifact into."
required: false
type: string
notification-channel:
description: "The name of the channel where the notification happens."
type: string
default: "pd2ndgendeployment"

secrets:
COSIGN_KEY_OPENSIGHT:
Expand Down Expand Up @@ -272,4 +276,5 @@ jobs:
uses: greenbone/workflows/.github/workflows/notify-mattermost-2nd-gen.yml@main
with:
status: ${{ contains(needs.*.result, 'failure') && 'failure' || 'success' }}
channel: ${{ inputs.notification-channel }}
secrets: inherit
5 changes: 5 additions & 0 deletions .github/workflows/container-build-push-feed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ on:
description: "Is this the vts image?"
default: "false"
type: string
notification-channel:
description: "The name of the channel where the notification happens."
type: string
default: "pdfeeddeploymentnotification"

secrets:
COSIGN_KEY_OPENSIGHT:
Expand Down Expand Up @@ -207,4 +211,5 @@ jobs:
uses: greenbone/workflows/.github/workflows/notify-mattermost-2nd-gen.yml@main
with:
status: ${{ contains(needs.*.result, 'failure') && 'failure' || 'success' }}
channel: ${{ inputs.notification-channel }}
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/helm-container-build-push-3rd-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ jobs:
- building-service-chart
- building-product-chart
- building-product-compose
if: ${{ !cancelled() && startsWith(github.ref, 'refs/tags/v') && startsWith(inputs.notify, 'true') }}
if: ${{ !cancelled() && startsWith(inputs.notify, 'true') }}
uses: greenbone/workflows/.github/workflows/notify-mattermost-3rd-gen.yml@main
with:
status: ${{ contains(needs.*.result, 'failure') && 'failure' || 'success' }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/notify-mattermost-2nd-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
description: "The monitored job, job status."
type: string
required: true
channel:
description: "The name of the channel where the notification happens."
type: string
default: pd2ndgendeployment
# Dependabot don't have this secrets and on PR's this secrets are not needed.
secrets:
MATTERMOST_WEBHOOK_URL:
Expand All @@ -33,7 +37,7 @@ jobs:
uses: greenbone/actions/mattermost-notify@v3
with:
url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
channel: "pd2ndgendeployment"
channel: ${{ inputs.channel }}
highlight: ${{ inputs.highlight }}
branch: ${{ github.ref_name }}
commit: ${{ inputs.commit }}
Expand Down

0 comments on commit 1b1d879

Please sign in to comment.