From 44a9d59bf19feaa11c45cb644f5b63eff4433fde Mon Sep 17 00:00:00 2001 From: Stephen Burman Date: Mon, 2 Dec 2024 12:14:46 +1100 Subject: [PATCH 1/3] Adding more information about the behaviour of manual interventions --- .../manual-intervention-and-approvals.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md b/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md index 9b46cac378..959bf87387 100644 --- a/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md +++ b/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md @@ -17,6 +17,12 @@ While fully automated deployment is a great goal, there are times when a human n The **Manual intervention step** is a step that can be added to deployment processes to pause the deployment to wait for a member of a specified team to either allow the deployment to proceed or to be aborted. +:::div{.hint} +Manual interventions result in either a success or failure outcome based on the user’s input. Subsequent steps evaluate this outcome according to their run conditions. By default, the run condition is set to "Success: only run when previous steps succeed." This means manual interventions can prevent these steps from executing, causing the deployment to fail. + +However, if "Always Run" is selected for subsequent steps, they will proceed regardless of the manual intervention outcome. For steps with the condition "Variable: only run when the variable expression is true," the manual intervention's outcome must be included in the variable expression to determine whether the step should run. +::: + [Getting Started - Manual Intervention](https://www.youtube.com/watch?v=ePQjCClGfZQ) ## Add a manual intervention step @@ -73,6 +79,13 @@ When a manual step is completed, details of the interruption are saved as variab | `Octopus.Action[Step Name].Output.Manual.ResponsibleUser.DisplayName` | The display name of the user who submitted the interruption form | *Jamie Jones* | | `Octopus.Action[Step Name].Output.Manual.ResponsibleUser.EmailAddress` | The email address of the user who submitted the interruption form | *jamie.jones@example.com* | +## Evaluating manual intervention output in following steps +If you want to control subsequent steps based on the outcome of the manual intervention step, you can use "Variable: only run when the variable expression is true". Use the following to evaluate the outcome of the manual intervention step": + +``` +#{unless Octopus.Deployment.Error}true#{/unless} +``` + ## Learn more - [Advanced manual approvals](/docs/deployments/databases/common-patterns/manual-approvals) From 9a0aba26b6a8d04a6805dff80074e3b23e9367b7 Mon Sep 17 00:00:00 2001 From: Steve Fenton <99181436+steve-fenton-octopus@users.noreply.github.com> Date: Mon, 2 Dec 2024 08:51:31 +0000 Subject: [PATCH 2/3] Update modified date --- .../manual-intervention-and-approvals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md b/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md index 959bf87387..118c6e5995 100644 --- a/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md +++ b/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2024-08-27 +modDate: 2024-12-02 title: Manual intervention and approval step icon: fa-solid fa-check description: Manual intervention and approvals allow a human to review, approve, or sign off on deployments. From 1e2214e78f80e848a3e81291ce5df17c7aff02f7 Mon Sep 17 00:00:00 2001 From: Stephen Burman Date: Tue, 3 Dec 2024 09:01:12 +1100 Subject: [PATCH 3/3] Updated suggestion --- .../manual-intervention-and-approvals.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md b/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md index 959bf87387..42e8923e72 100644 --- a/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md +++ b/src/pages/docs/projects/built-in-step-templates/manual-intervention-and-approvals.md @@ -80,10 +80,14 @@ When a manual step is completed, details of the interruption are saved as variab | `Octopus.Action[Step Name].Output.Manual.ResponsibleUser.EmailAddress` | The email address of the user who submitted the interruption form | *jamie.jones@example.com* | ## Evaluating manual intervention output in following steps -If you want to control subsequent steps based on the outcome of the manual intervention step, you can use "Variable: only run when the variable expression is true". Use the following to evaluate the outcome of the manual intervention step": +If you want to control subsequent steps based on the outcome of the manual intervention step, you can use "Variable: only run when the variable expression is true", and use the `Octopus.Deployment.Error` variable as the conditional. For example: ``` -#{unless Octopus.Deployment.Error}true#{/unless} +#{unless Octopus.Deployment.Error}RESULT IF MANUAL INTERVENTION PROCEEDED{/unless} +``` +or +``` +#{if Octopus.Deployment.Error}RESULT IF MANUAL INTERVENTION WAS ABORTED{/if} ``` ## Learn more