on_skipped option doesn't work
Closed this issue · 0 comments
raeyulca commented
What happened:
Supplying the on_skipped
condition to a task's dependent task does not result in the task running, when the dependent task is skipped.
What you expected to happen:
I expect that the task to run when the dependent task is skipped.
How to reproduce it (as minimally and precisely as possible):
Here is a configuration file that reproduces the error; the third task should run, but it doesn't.
version: v0
runs:
- name: show issue
tasks:
- name: successful task
runtime:
containers:
- image: alpine
steps:
- run:
name: echo
command: echo hello
- name: failure-dependent task
depends:
- successful task:
- on_failure
runtime:
containers:
- image: alpine
steps:
- run:
name: echo
command: echo "The previous task failed."
- name: skip-dependent task
depends:
- failure-dependent task:
- on_skipped
runtime:
containers:
- image: alpine
steps:
- run:
name: echo
command: echo "The previous task was skipped."
Anything else we need to know?:
I was able to resolve this issue by modifying /internal/runconfig/runconfig.go
Before the fix:
After the fix:
Environment:
- Agola version: latest (0.6.0)
- Agola running environment (if useful to understand the bug): Docker
- Others: