Skip to content

Commit

Permalink
ci: add slack notification to GH actions
Browse files Browse the repository at this point in the history
Signed-off-by: Maciej Kwiek <maciej@isovalent.com>
  • Loading branch information
nebril committed May 19, 2021
1 parent 9366190 commit c132e65
Show file tree
Hide file tree
Showing 18 changed files with 207 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,12 @@ jobs:
description: Connectivity test cancelled
state: pending
target_url: ${{ env.check_url }}

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
24 changes: 24 additions & 0 deletions .github/workflows/bpf-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ jobs:
fetch-depth: 0
- name: Run checkpatch.pl
uses: docker://quay.io/cilium/cilium-checkpatch:cc7e6b5811f46d7b040dedfe2f6b0010c2c51a12@sha256:9160b6ca58eb99a3ed5d567a494b2e2001325ebad32029c5bd17a8ae4df01044
- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
coccicheck:
name: coccicheck
runs-on: ubuntu-latest
Expand All @@ -33,6 +41,14 @@ jobs:
- uses: docker://cilium/coccicheck:2.0
with:
entrypoint: ./contrib/coccinelle/check-cocci.sh
- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
build_all:
name: build datapath
runs-on: ubuntu-latest
Expand Down Expand Up @@ -66,3 +82,11 @@ jobs:
- name: Run BPF_PROG_TEST_RUN tests
run: |
make -C bpf go_prog_test || (echo "Run 'make -C bpf go_prog_test' locally to investigate failures"; exit 1)
- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
8 changes: 8 additions & 0 deletions .github/workflows/build_commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,11 @@ jobs:
if: ${{ failure() }}
run: git --no-pager log --format=%B -n 1

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9 changes: 9 additions & 0 deletions .github/workflows/cyclonus-netpol-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,12 @@ jobs:
with:
name: cilium-sysdump-out.zip
path: cilium-sysdump-out.zip

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
8 changes: 8 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ jobs:
with:
entrypoint: ./Documentation/check-build.sh
args: html
- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9 changes: 9 additions & 0 deletions .github/workflows/eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,12 @@ jobs:
description: Connectivity test cancelled
state: pending
target_url: ${{ env.check_url }}

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9 changes: 9 additions & 0 deletions .github/workflows/gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,12 @@ jobs:
description: Connectivity test cancelled
state: pending
target_url: ${{ env.check_url }}

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
41 changes: 41 additions & 0 deletions .github/workflows/go-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ jobs:
go mod tidy
go mod vendor
git diff --exit-code || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1)
- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

golangci:
name: lint
Expand All @@ -46,6 +54,14 @@ jobs:
with:
version: v1.37.1
skip-go-installation: true
- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

precheck:
runs-on: ubuntu-latest
Expand All @@ -64,6 +80,14 @@ jobs:
run: |
cd src/github.com/cilium/cilium
make precheck
- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

generate-api:
runs-on: ubuntu-latest
Expand All @@ -82,6 +106,14 @@ jobs:
run: |
cd src/github.com/cilium/cilium
contrib/scripts/check-api-code-gen.sh
- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

generate-k8s-api:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -111,3 +143,12 @@ jobs:
run: |
cd src/github.com/cilium/cilium
contrib/scripts/check-k8s-code-gen.sh
- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9 changes: 9 additions & 0 deletions .github/workflows/images-legacy-base-releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ jobs:
path: image-digest
retention-days: 1

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

image-digests:
if: ${{ github.repository == 'cilium/cilium' }}
name: Display Digests
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/images-legacy-hotfix-releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ jobs:
path: image-digest
retention-days: 1

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

image-digests:
if: ${{ github.repository == 'cilium/cilium' }}
name: Display Digests
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/images-legacy-releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ jobs:
path: image-digest
retention-days: 1

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

image-digests:
if: ${{ github.repository == 'cilium/cilium' }}
name: Display Digests
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/images-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ jobs:
path: image-digest
retention-days: 1

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

image-digests:
if: ${{ github.repository == 'cilium/cilium' }}
name: Display Digests
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ jobs:
with:
entrypoint: make
args: -C images check-runtime-image check-builder-image

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9 changes: 9 additions & 0 deletions .github/workflows/kind-1.19.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,12 @@ jobs:
name: cilium-sysdump-out.zip
path: cilium-sysdump-out.zip
retention-days: 5

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9 changes: 9 additions & 0 deletions .github/workflows/multicluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,12 @@ jobs:
description: Connectivity test cancelled
state: pending
target_url: ${{ env.check_url }}

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9 changes: 9 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --namespace=test-clusters --init-manifest=cilium.yaml --image=cilium/cilium-perf-test:8cfdbfe "/usr/local/bin/run_in_test_cluster.sh" "--prom-name=prom" "--prom-ns=prom" "--duration=30m" "--manifest-path=/go/src/github.com/cilium/cilium-perf-test/1.8/manifests/"

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9 changes: 9 additions & 0 deletions .github/workflows/smoke-test-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,12 @@ jobs:
with:
name: cilium-sysdump-out.zip
path: cilium-sysdump-out.zip

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9 changes: 9 additions & 0 deletions .github/workflows/smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,12 @@ jobs:
with:
name: cilium-sysdump-out.zip
path: cilium-sysdump-out.zip

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit c132e65

Please sign in to comment.