Hi all, i’ve been doing some testing with drone and the exit code 78 and i found out the skipped steps are still running.
i do have a case where conditionally a step exit with code 78, so when code 78 is raised i do not want to execute the slack notification, but if the exit code 78 is not there i want to be notified that the build has finished, either it fails or not.
So if i do not add the
when:
status:
- success
- failure
The skip part works as expected and i do not get notified when the exit code 78 is present, but i do not get notified if the pipeline finish with error. So i tried to add
when:
status:
- failure
But then i do not get notified if there is no exit code 78 and no errors.
Then i tried to add both statuses, which trigger the notification even if there is an exit code 78, and the UI shows the step as skipped.
---
kind: pipeline
type: kubernetes
name: test
steps:
- name: hello
image: alpine:3.8
commands:
- echo hello
- name: world
image: alpine:3.8
commands:
- echo world
- exit 78
- name: test
image: alpine:3.8
commands:
- sleep 15
- name: slack
image: plugins/slack
settings:
webhook: https://hooks.slack.com/services/my_code
channel: drone-tests
when:
status:
- success
- failure
services:
- name: redis
image: redis