Force cancel a task

If you want to remove tasks that are stuck and cannot be canceled due to failing steps, you can use the force cancel option. It is intended to use force cancel only as a last resort option to clean up tasks.

To force cancel a deployment task from the GUI, you must have the admin global permissions. The force cancel action sets the task to a cancelled state, deletes all related files, and skips all the failed steps.

Notes:

  • Force cancel ignores failures on any step. If any errors occur during a Register deployeds step, the force cancel ignores these errors and continues with the next steps. This action can create inconsistencies between the repository and the target environment, because some CIs might not be registered.
  • Force cancel, like the normal cancel task option, cannot be used on executing tasks.

Use the force cancel option

To force cancel a task:

  1. Click Explorer and go to Monitoring in the left pane.
  2. Double click Deployment tasks.
  3. In the list of tasks, identify the task you want to cancel.
  4. Click Menu button and select Force cancel.

The force cancel option has the same functionality as the cancel task option, with the following differences:

  • All the pending steps in runAlways phases will still be tried in their regular order. If a step fails, the execution continues with the next step instead of stopping the deployment task. You can see a message in the logs containing this information.
  • The force cancel action ignores Paused steps.
  • Failed steps in a runAlways phase will not be retried. This is done to ensure the possibility of task progress: a step in a runAlways phase can still get stuck. In this case, you can abort the execution, which makes the step go to failed state, and then click force cancel again. The stuck step will not be run again.
  • The task is archived as force cancelled and is marked in the logs that it was force cancelled. If all steps succeed normally during force cancel, the task will be marked as cancelled.