Prevent containerlab:destroy pipeline step from running if not needed
Description
Currently, the containerlab:destroy pipeline step is executed every time. However, it can be ignored when the containerlab:deploy step was not executed. This takes additional resources and time.
Expected Behavior
If the containerlab:deploy step was executed, regardless of if it failed or passed, execute containerlab:destroy.
Actual Behavior
containerlab:destroy is executed every time. Even when containerlab:deploy was not executed.
Possible Fix
Ignore containerlab:destroy when containerlab:deploy was ignored.
Steps to Reproduce
Context
Your Environment
- Version used:
- Environment name and version (e.g. go v1.16.3 on FreeBSD 13.0-current):
- Server type and version:
- Operating System and version: