Allow after_script to be be conditional
I would like to see the addition of a property for after_script, the same used for stages
after_script:
when: on_failure
script:
- execute clean up
our use case is
stages:
- build_cloud_cluster
- test_cluster
- cleanup_cluster
build_cloud_cluster:
stage: build_cloud_cluster
script:
- make cluster
after_script:
when: on_failure
script:
- save log as artifact
- make clean
...
...
Right now we can use a separate Stage to handle failure in the previous stage, but it becomes messy in the pipeline view when you end up with a clean up stage for each stages.
Edited by 🤖 GitLab Bot 🤖