Failed build trigger in team city TeamCity

前端 未结 2 527
借酒劲吻你
借酒劲吻你 2021-02-14 08:44

Is it possible to Trigger an exe to run on a failed build? Can you do this within Team City?

相关标签:
2条回答
  • 2021-02-14 09:15

    I don't think it's possible to trigger an executable to run only on failed TeamCity builds. TeamCity usually allows you to do things either always or only upon successful builds.

    It would be possible to trigger an executable to run after this build is finished (failed or successful).

    If that would work for you, you could set up a new build configuration that runs the executable. The new build configuration would have a "finish build" trigger. This would cause the executable to be run whenever the other build is completed.

    0 讨论(0)
  • 2021-02-14 09:20

    If you specifically want the failed builds, you can set up the dependent build as Eric said, and have that secondary buildscript use the REST API to pull up a list of the failed builds for the actual project.

    If the latest build is in that failed builds list, then tell the build script to run the executable. If not, then you're all done!

    http://confluence.jetbrains.net/display/TW/REST+API+Plugin

    0 讨论(0)
提交回复
热议问题