mirror of
https://github.com/kerberos-io/deployment.git
synced 2026-08-23 15:18:32 +00:00
Refactor Slack notifications in CI workflows for K3d, Kind, Kustomize, and MicroK8s to simplify messages and improve readability
This commit is contained in:
8
.github/workflows/k3d.yaml
vendored
8
.github/workflows/k3d.yaml
vendored
@@ -133,14 +133,10 @@ jobs:
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data "{
|
||||
\"text\": \"✅ K3d Deployment Successful! :rocket:\n*OS*: ${{ matrix.os }}\n*K3d Version*: ${{ matrix.k3d }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\"
|
||||
}" $SLACK_WEBHOOK_URL
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"✅ K3d deployment successful on ${{ matrix.os }} (${{ matrix.k3d }}) - triggered by ${{ github.actor }}\"}" $SLACK_WEBHOOK_URL
|
||||
- name: Send Slack Notification on Failure
|
||||
if: failure()
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data "{
|
||||
\"text\": \"❌ K3d Deployment Failed! :x:\n*OS*: ${{ matrix.os }}\n*K3d Version*: ${{ matrix.k3d }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\n*Run URL*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"
|
||||
}" $SLACK_WEBHOOK_URL
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"❌ K3d deployment failed on ${{ matrix.os }} (${{ matrix.k3d }}) - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>\"}" $SLACK_WEBHOOK_URL
|
||||
8
.github/workflows/kind.yaml
vendored
8
.github/workflows/kind.yaml
vendored
@@ -129,14 +129,10 @@ jobs:
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data "{
|
||||
\"text\": \"✅ Kind Deployment Successful! :rocket:\n*OS*: ${{ matrix.os }}\n*Kind Version*: ${{ matrix.kind }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\"
|
||||
}" $SLACK_WEBHOOK_URL
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"✅ Kind deployment successful on ${{ matrix.os }} (${{ matrix.kind }}) - triggered by ${{ github.actor }}\"}" $SLACK_WEBHOOK_URL
|
||||
- name: Send Slack Notification on Failure
|
||||
if: failure()
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data "{
|
||||
\"text\": \"❌ Kind Deployment Failed! :x:\n*OS*: ${{ matrix.os }}\n*Kind Version*: ${{ matrix.kind }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\n*Run URL*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"
|
||||
}" $SLACK_WEBHOOK_URL
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"❌ Kind deployment failed on ${{ matrix.os }} (${{ matrix.kind }}) - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>\"}" $SLACK_WEBHOOK_URL
|
||||
28
.github/workflows/kustomize.yaml
vendored
28
.github/workflows/kustomize.yaml
vendored
@@ -29,19 +29,15 @@ jobs:
|
||||
kubectl get sc
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
# - name: Send Slack Notification on Success
|
||||
# if: success()
|
||||
# env:
|
||||
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
# run: |
|
||||
# curl -X POST -H 'Content-type: application/json' --data "{
|
||||
# \"text\": \"✅ Kustomize Deployment Successful! :rocket:\n*OS*: ${{ matrix.os }}\n*Kind Version*: ${{ matrix.kind }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\"
|
||||
# }" $SLACK_WEBHOOK_URL
|
||||
# - name: Send Slack Notification on Failure
|
||||
# if: failure()
|
||||
# env:
|
||||
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
# run: |
|
||||
# curl -X POST -H 'Content-type: application/json' --data "{
|
||||
# \"text\": \"❌ Kustomize Deployment Failed! :x:\n*OS*: ${{ matrix.os }}\n*Kind Version*: ${{ matrix.kind }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\n*Run URL*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"
|
||||
# }" $SLACK_WEBHOOK_URL
|
||||
- name: Send Slack Notification on Success
|
||||
if: success()
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"✅ Kustomize deployment successful on ${{ matrix.os }} (${{ matrix.kind }}) - triggered by ${{ github.actor }}\"}" $SLACK_WEBHOOK_URL
|
||||
- name: Send Slack Notification on Failure
|
||||
if: failure()
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"❌ Kustomize deployment failed on ${{ matrix.os }} (${{ matrix.kind }}) - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>\"}" $SLACK_WEBHOOK_URL
|
||||
8
.github/workflows/microk8s.yaml
vendored
8
.github/workflows/microk8s.yaml
vendored
@@ -122,15 +122,11 @@ jobs:
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data "{
|
||||
\"text\": \"✅ MicroK8s Deployment Successful! :rocket:\n*OS*: ${{ matrix.os }}\n*MicroK8s Version*: ${{ matrix.microk8s }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\"
|
||||
}" $SLACK_WEBHOOK_URL
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"✅ MicroK8s deployment successful on ${{ matrix.os }} (${{ matrix.microk8s }}) - triggered by ${{ github.actor }}\"}" $SLACK_WEBHOOK_URL
|
||||
- name: Send Slack Notification on Failure
|
||||
if: failure()
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data "{
|
||||
\"text\": \"❌ MicroK8s Deployment Failed! :x:\n*OS*: ${{ matrix.os }}\n*MicroK8s Version*: ${{ matrix.microk8s }}\n*Workflow*: ${{ github.workflow }}\n*Triggered by*: ${{ github.actor }}\n*Repository*: ${{ github.repository }}\n*Run URL*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"
|
||||
}" $SLACK_WEBHOOK_URL
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"❌ MicroK8s deployment failed on ${{ matrix.os }} (${{ matrix.microk8s }}) - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>\"}" $SLACK_WEBHOOK_URL
|
||||
|
||||
Reference in New Issue
Block a user