Skip to content

Commit

Permalink
chore: enable Slack notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Denysenko committed Jun 16, 2023
1 parent 96a4a65 commit 0b4fb59
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .drone/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ steps :
- mvn pmd:check --batch-mode -Dstyle.color=always -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD
- mvn com.github.spotbugs:spotbugs-maven-plugin:4.7.3.4:check -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD -Dspotbugs.xmlOutput=true -Dspotbugs.failOnError=true -Dspotbugs.excludeFilterFile=../spotbugs-exclude.xml -Dspotbugs.includeTests=true -Dstyle.color=always

- name : notify-slack-on-failure
image : plugins/slack
settings :
webhook :
from_secret : SLACK_WEBHOOK
channel : dev
template : >
:red_circle: :thunder_cloud_and_rain: {{build.link}} ({{build.branch}}) by {{build.author}}
when :
status :
- failure
depends_on :
- code-coverage-gate
- static-analysis-gate


services :
- name : rabbitmq
image : rabbitmq:3.11-management-alpine
Expand Down Expand Up @@ -140,6 +156,26 @@ steps :
depends_on :
- publish-release-jar

- name : notify-slack
image : plugins/slack
settings :
webhook :
from_secret : SLACK_WEBHOOK
channel : dev
template : >
{{#success build.status}}
:large_green_circle: :package: *${DRONE_COMMIT_MESSAGE}*
{{build.link}} ({{build.branch}}) by {{build.author}}
{{else}}
:red_circle: :package: {{build.link}} ({{build.branch}}) by {{build.author}}
{{/success}}
when :
status :
- failure
- success
depends_on :
- publish-snapshot-jar
- publish-release-jar
---

kind : pipeline
Expand Down Expand Up @@ -250,6 +286,25 @@ steps :
- kubectl version --output=yaml
- helm upgrade --install --atomic --wait --timeout 2m ${DRONE_REPO_NAME} ./ --values ./values.yaml --values ./${DRONE_DEPLOY_TO}-values.yaml --set image.tag=${DRONE_BRANCH:22}-${CI_PARENT_BUILD_NUMBER} -n ${DRONE_DEPLOY_TO}-env

- name : notify-slack
image : plugins/slack
settings :
webhook :
from_secret : SLACK_WEBHOOK
channel : dev
template : >
{{#success build.status}}
:large_green_circle: :ship: *${DRONE_COMMIT_MESSAGE}*
{{build.link}} ({{build.branch}}) by {{build.author}}
{{else}}
:red_circle: :anchor: {{build.link}} ({{build.branch}}) by {{build.author}}
{{/success}}
when :
status :
- failure
- success
depends_on :
- deploy
---

kind : pipeline
Expand Down Expand Up @@ -300,6 +355,26 @@ steps :
- kubectl version --output=yaml
- helm upgrade --install --atomic --wait --timeout 2m ${DRONE_REPO_NAME} ./ --values ./values.yaml --values ./${DRONE_DEPLOY_TO}-values.yaml --set image.tag=${DRONE_TAG} -n ${DRONE_DEPLOY_TO}-env

- name : notify-slack
image : plugins/slack
settings :
webhook :
from_secret : SLACK_WEBHOOK
channel : dev
template : >
{{#success build.status}}
:large_green_circle: :ship: *${DRONE_COMMIT_MESSAGE}*
{{build.link}} ({{build.branch}}) by {{build.author}}
{{else}}
:red_circle: :anchor: {{build.link}} ({{build.branch}}) by {{build.author}}
{{/success}}
when :
status :
- failure
- success
depends_on :
- deploy

---

kind : pipeline
Expand Down

0 comments on commit 0b4fb59

Please sign in to comment.