I use “Octopus Deploy integration” plugin version “6.1.14” in TeamCity 2022.10.1.
I use the Build Information step from the plugin to attach info about the commits on successful build, before creating a new release pointing to that PackageId.
However, if a build fails the build information of the next successful build - which ends up being part of a new release in Octopus, doesn’t contain any information about the commits that were part of the failed build. So the release notes are missing one build (or multiple), with potentially multiple commits.
I tried setting the Build Information step to pass build information to Octopus even for failed builds, but as they are never used in any releases, they aren’t included in the release notes.
I would assume it’s the job of the TeamCity plugin to include information from earlier failed builds when submitting build information, or is there something I could configure differently?
I first pushed two commits giving a test failure, and then I pushed a third commit with a fix. TeamCity only reports the successful build as having one (new) commit. This is what’s passed when octo.exe gathers and reports build information. Here’s the package in Octopus’ Build Information Repository:
The team that writes the plugin actually already has this on their to-do list. Unfortunately, this isn’t trivial because we are planning on moving the mechanism to Octopus Server itself to calculate what needs to be brought along with the next package’s build information and not the most recent build in TeamCity. Due to the nature of the amount of work involved, this won’t be a quick fix.
Without doing a huge deep dive myself, it looks like it might be possible for you to use TeamCity’s API to gather commits from the current build and all previous failed builds since the last successful build and bundle them up into a build information file and push that to Octopus with the octo command build-information.
I’m sorry I don’t have better news for you, but it will be fixed in the future!
Please let me know if you have any questions or concerns.
You’re very welcome. I’m hoping at some point I can get some free time to sit down and tinker with it myself, so if you do make any headway please let me know!