onSuccessOrFailureHook 定义
用于运行回滚作或清理的步骤。
onSuccessOrFailureHook:
failure: # Runs on failure of any step.
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
pool: string | pool # Pool where post on failure steps will run.
success: # Runs on success of all of the steps.
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
pool: string | pool # Pool where on success steps will run.
注释
此定义是一个支持定义,不适用于直接在管道中使用。 本文提供了此支持类型的 YAML 语法,但不显示用法示例。 有关使用此类型支持的定义的详细信息,请参阅以下定义链接。
引用此定义的定义:jobs.deployment.strategy.runOnce、jobs.deployment.strategy.rolling、jobs.deployment.strategy.canary
性能
failure
onFailureHook。
在任何步骤失败时运行。
success
onSuccessHook。
在完成所有步骤后运行。