I want to send notifications to slack for all my steps.
For the pending-approval type I want to send a message that indicates approval or denial but
If I run the pipeline below and approve or deny then none of the hooks are executed, can you shed any light on this please?
hooks:
on_elected:
exec:
image: zedplanet/slackmessenger
commands:
- echo on_success
- ls
- env
on_success:
exec:
image: zedplanet/slackmessenger
commands:
- echo on_success
- ls
- env
on_fail:
exec:
image: zedplanet/slackmessenger
commands:
- echo on_fail
- ls
- env
stages:
- "deploy_uat"
steps:
approval_to_deploy_uat:
title: "Approval"
type: pending-approval
stage: "deploy_uat"
timeout:
duration: 24
finalState: denied
when:
branch:
only: [ main ]
hooks:
on_elected:
exec:
image: zedplanet/slackmessenger
commands:
- echo on_elected
- env
on_finish:
exec:
image: zedplanet/slackmessenger
commands:
- echo on_finish
- env
on_success:
exec:
image: zedplanet/slackmessenger
commands:
- echo on_success
- env
on_fail:
exec:
image: zedplanet/slackmessenger
commands:
- echo on_fail
- env```