diff --git a/cicd/pipeline.yaml b/cicd/pipeline.yaml index 67852ff..feca670 100644 --- a/cicd/pipeline.yaml +++ b/cicd/pipeline.yaml @@ -73,7 +73,7 @@ steps: ./deploy/k8s/manifest.yaml - name: push k8s manifest - image: appleboy/drone-git-push + image: appleboy/drone-git-push:0.2.2 settings: remote_name: "git@github.com:${DRONE_REPO}" branch: ${DRONE_BRANCH} @@ -99,6 +99,33 @@ volumes: host: path: /var/lib/.kube +--- +kind: pipeline +type: docker +name: notify + +depends_on: + - deploy + +trigger: + status: + - success + - failure + +steps: + - name: slack + image: plugins/slack + settings: + webhook: + from_secret: slack_webhook_url + channel: cicd + template: > + {{#success build.status}} + Build and deploy {{build.number}} of {{repo.name}} succeeded. + {{else}} + Build and deploy {{build.number}} of {{repo.name}} failed. + {{/success}} + --- kind: secret name: harbor_registry_drone_password @@ -112,3 +139,10 @@ name: github_ssh_key get: path: github-ssh-keys name: id_rsa + +--- +kind: secret +name: slack_webhook_url +get: + path: slack-webhook-url + name: url \ No newline at end of file