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?
Thanks for reaching out. Just to be sure I fully understand what is happening in your scenario please let me know if my recap is correct.
- Code changes are made
- TeamCity Build starts ( and fails )
- Changes are made to make the Teamcity Build Succeed (What type of changes were made and where? Code base side, or the teamcity pipeline side?)
- TeamCity Build starts (and succeeds).
You are saying that the commits from the failed build in step 2 are not making it to step 4 and thus not propagating to Octopus?
Please let me know if that is the correct sequence of events and where the changes are happening to make the second build work.
Hi, I forgot to specify the type of changes, they are all code changes/git commits.
Here’s a screenshot from TeamCity as an example:
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:
Thanks so much for the confirmation and supplemental screenshots.
I’m seeing this behavior on my end as well and I’m going to have a chat with the developers about it and get back to you.
Please let me know if you have any questions or concerns in the meantime.
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.
Hey, I understand. I’ll look into doing something myself to gather the list of commits.
Thanks for looking into this for me!
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!
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.