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。
在所有步驟成功時執行。