We have the need to exclude certain phases of a Release, based on passed variables.

At the moment we have to add a sequential group to the Phase, and add a conditional to that group to ensure that it either gets executed or not.

Sometimes tasks are executed, as they get added to the phase, outside of the sequential group, and are so executed when they should not be,

Comments

  • Thank you for the idea. As a potential implementation, we could introduce a new task type "Phase skip". This task would enable a release phase to be automatically skipped based on a predefined pre-condition (leveraging the existing pre-condition and task logic).

    Behavior:
    - When pre-condition evaluates to true: the current phase will be Skipped. All remaining tasks within the phase will be marked as Skipped. If this is the final phase, the release will be marked as Completed.

    - If pre-condition evaluates to false: the phase proceeds as usual.

    - If pre-condition is invalid or results in an error: The "Phase skip" task would fail. This allows for investigation and retry after fixing the issue.

    This approach would allow us to reuse the existing pre-condition mechanism without introducing a new entity at the phase level. Also, given it's a task, it could be used in any position of the given phase.

    ---

    Do you think this would satisfy the use cases you are working with?
    Are there any concerns or edge cases you foresee with this approach? Would you prefer an alternative method to control phase execution?