How do I get errors to propagate in the TeamCity PowerShell runner

后端 未结 10 2221
轻奢々
轻奢々 2020-12-05 23:47

I have a TeamCity 7 Build Configuration which is pretty much only an invocation of a .ps1 script using various TeamCity Parameters.

I was hoping that mig

10条回答
  •  囚心锁ツ
    2020-12-06 00:34

    There is an known bug in TeamCity that causes the behavior that the original poster noticed.

    It is easy to work around, however.

    At the end of your PowerShell script, add output indicating that the end of the script has been reached:

    Echo "Packaging complete (end of script reached)"
    

    Then, set up a new Build Failure Condition on your build to fail if the text you are echoing is NOT present in the output.

提交回复
热议问题