Get build step which failed

I'd like to extend our notification system with the specific build step which failed. Currently I have a build step which runs a bash script which tells us the build number, build url, etc, but I can't seem to find anything that reports which build step failed.

0
4 comments

I’ve noticed that when a job runs, TeamCity actually creates a separate status variable for each build step like teamcity.build.step.status.<stepid>. These get updated with either 'success' or 'failure' depending on how each step goes. Maybe you can use these to track which specific step failed.

0

Aram Rodriguez  Thanks for that tip! I think I could make it work. I believe this is available on a newer TC version that what we are currently running on (2023.05). We are in the process of updating, so hopefully I have access to that soon.

0

Aram Rodriguez We've since updated to 2024.07.3 and am able to access the params for the build step status. Will keep an eye on this to see if it works as we expect. Thanks again.

0

No problem, Luis! Glad the update to 2024.07.3 seems to be doing the trick.

0

Please sign in to leave a comment.