Skip to content

Commit

Permalink
ROX-25715: Add Slack notifications for Konflux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
tommartensen committed Aug 15, 2024
1 parent 7f039bd commit 72431ac
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .tekton/scanner-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ spec:

# Multiarch builds sometimes make the pipeline timeout after 1h.
timeouts:
pipeline: 1h30m0s
tasks: 1h30m
finally: 10m
pipeline: 1h40m

pipelineRef:
name: scanner-component-pipeline
20 changes: 20 additions & 0 deletions .tekton/scanner-component-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ metadata:
spec:

finally:
- name: slack-notification
params:
- name: message
value: ':x: `{{event_type}}` pipeline for <https://console.redhat.com/application-pipeline/workspaces/rh-acs/applications/acs/pipelineruns/$(context.pipelineRun.name)|$(context.pipelineRun.name)> (`$(params.output-image-repo)`, revision <$(params.git-url)/commit/$(params.revision)|$(params.revision)>) has failed.'
- name: key-name
value: 'acs-konflux-notifications'
when:
# Run when any task has Failed
- input: $(tasks.status)
operator: in
values: ["Failed"]
taskRef:
params:
- name: name
value: slack-webhook-notification
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-slack-webhook-notification:0.1@sha256:0dfdfd87a8716ff9c20ae3325eff9a5d52ee9c708959c1e93eaedc852621a4d5
- name: kind
value: task
resolver: bundles
- name: show-sbom
params:
- name: IMAGE_URL
Expand Down
6 changes: 6 additions & 0 deletions .tekton/scanner-db-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,11 @@ spec:
requests:
cpu: 1

timeouts:
tasks: 1h
finally: 10m
pipeline: 1h10m


pipelineRef:
name: scanner-component-pipeline
5 changes: 5 additions & 0 deletions .tekton/scanner-db-slim-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,10 @@ spec:
requests:
cpu: 1

timeouts:
tasks: 1h
finally: 10m
pipeline: 1h10m

pipelineRef:
name: scanner-component-pipeline
4 changes: 3 additions & 1 deletion .tekton/scanner-slim-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ spec:

# Multiarch builds sometimes make the pipeline timeout after 1h.
timeouts:
pipeline: 1h30m0s
tasks: 1h30m
finally: 10m
pipeline: 1h40m

pipelineRef:
name: scanner-component-pipeline

0 comments on commit 72431ac

Please sign in to comment.