There are some steps that if triggered should block others. This will allow some kind of branching. Let’s say that my pipeline is building a cake. One step could be “eat the cake” and the other “throw the cake in the trash”. Both steps are very useful. But, I would like to avoid somebody trying to eat the cake after throwing it in the trash.
We could just point to the other step and say that after successfully running that step we should not be able to run some other steps. It would be very similar to the “depends_on” attribute, but working in the reverse.
steps: - block: Build the Cake - block: Eat the Cake depends_on: Build the Cake if_not: Throw the Cake in the Trash - block: Throw the Cake in the Trash depends_on: Build the Cake if_not: Eat the Cake