I했습니다 "도서관"아래 문어 변수 - 이름문어 출력 변수와 그들에게 접근
1. DatabaseExceptions
2. ReportsExceptions
3. ApplicationExceptions
내가 단계로 문어에 내 프로젝트 "배포 과정"의 설정을했습니다와> "변수 설정"변수
1. Database
2. Reports
3. Application
4. Send Email
상기 가변
는 스크립트 예외의 특정 단계를 사용 predeploy.ps1 호출 'PowerShell을'스크립트를 사용하여 예외 설정된다.마지막 단계 (전자 메일 보내기)에서 특정 변수에 정보가 있는지 검사하여 예외 변수의 정보가있는 전자 메일을 보내려고했습니다. 내가
<h2>Deployment Steps</h2>
<ol>
#{each step in Octopus.Step}
#{if step.Status.Code}
<li>#{step | HtmlEscape} —
#{if Step.Name == "Database"}
#{if Octopus.Action[Database].Output.DatabaseExceptions}
<pre>#{Octopus.Action[Database].Output.DatabaseExceptions}</pre>
#{/if}
#{/if}
#{if Step.Name == "Reports"}
#{if Octopus.Action[Reports].Output.ReportsExceptions}
<pre>#{Octopus.Action[Reports].Output.ReportsExceptions}</pre>
#{/if}
#{/if}
#{if Step.Name == "Application"}
#{if Octopus.Action[Application].Output.ApplicationExceptions}
<pre>#{Octopus.Action[Application].Output.ApplicationExceptions}</pre>
#{/if}
#{/if}
</li>
#{/if}
#{/each}
</ol>
데이터베이스 및 보고서 스크립트 오류가 내 출력은 같은 그 이하가 올바른지 보인다 ("HTML로 몸") 체크 상자를 선택하여 이메일 보내기 단계 본문에이 일을하고있어
Deployment Steps
1. Database — Exception on processing DB scripts - info:...
2. Reports — Exception on processing Reports - info:...
3. Application
4. Send Email
그리고 내 질문을 예상대로 :
인가 그것은 가능 불행하게도 이메일 템플릿 내에서 가능하지 않는 것 같은
<h2>Deployment Steps</h2>
<ol>
#{each step in Octopus.Step}
#{if step.Status.Code}
<li>#{step | HtmlEscape} —
#{if Octopus.Action[#{step.Name}].Output.#{step.Name}Exceptions}
<pre>#{Octopus.Action[#{step.Name}].Output.#{step.Name}Exceptions}</pre>
#{/if}
</li>
#{/if}
#{/each}
</ol>
안녕 알렉스, 내가 말 회신 정말 미안 해요 : 같은 이메일 출력 초래
합니다. 귀하의 답변에 정말 감사드립니다. 이메일 알림을 수정하는 데 다소 도움이됩니다. 다시 한 번 솔루션에 대한 감사드립니다. –