Hello
We recently upgraded our builds on Azure Devops on Premise to use version 5 of the Octopus Deploy Integration extension.
We only now realized we were loosing the change set comments that were included with version 4.
The Create Octopus Release step had options to include Change Set Comments.
With version 5 those options are gone.
Do you have a way with version 5 extension to include change set comments?
Thanks for posting your question to the Octopus Community forum!
I believe the way to do this is to add a step to your Release process, with the Push Package Build Information to Octopus task. You can find more information on this in our documentation here: Using the Octopus extension - Octopus Deploy
There may be some other helpful documentation there regarding recent changes in version 5 of the Octopus Deploy Integration extension, so you might have a look around the other sections as well in case there is additional information applicable to your use case.
I hope thatâs helpful, but let me know what you think!
Hi Patrick
Thanks for getting back to me so quickly.
So i have added the âPush Package Build Information to Octopusâ task.
However it doesnât quite do the same thing it seems
On the Octopus side we used a community template to consolidate our release notes
This octopus community template script gets release notes stored with each octopus using an API call and consolidates them.
However it seems there are no change set comments pushed over into the release notes like the Create Octopus Release step did.
Iâm just stepping in for Patrick as heâs offline with our US Support team.
Another customer has previously had success with pushing their âRelease Notesâ to show the commit/work-item details while using V5 of the plugin. Iâm hoping this might also get you the result youâre after.
Firstly you will need to make sure that the TFS build stepâs âRelease Notesâ section is empty (and youâre pushing the build info in a separate step):
From here you will need to define a Release Notes Template (under Project > Deployment Settings > Release Notes Template) to gather the required information from the Package. See our docs for some examples and tips:
#{each package in Octopus.Release.Package}
- #{package.PackageId} #{package.Version}
#{each workItem in package.WorkItems}
- [#{workItem.Id}](#{workItem.LinkUrl}) - #{workItem.Description}
#{/each}
#{/each}
Lastly this should show the commits/work-items in the Release Notes section of your projects Releases.
Lauren, one more question, when i use line breaks in my commit message they do not show up in the release notes . I can see them though under the Build Information. Would you know how I can fix this in the release notes template?
Iâm glad to hear Laurenâs suggestion worked, and thanks for your follow-up questions.
Regarding your first question on setting a template globally, I was able to find a way to do this, and Iâm curious if it might work for your use case as well. You can accomplish this using a Library Variable Set and specifically using the following steps:
Create a Library Variable Set under Library > Variable Sets (or use an existing one)
Add a new variable and set the value of the release notes by clicking âOpen Editorâ and pasting in the release notes template:
That should populate the release notes on the Releases Page when you create a new release:
Regarding your second question on why the line breaks arenât included, unfortunately there is a limitation here on what can be displayed so if youâre using /n for line breaks unfortunately it currently wonât work with the way our release notes treat the formatting. You can find further information in another post here: Release Note variables cutting off commit comments - #8 by Kenneth_Bates
Iâm sorry I donât have better news on the second answer, but I hope this is helpful.
Let me know how it goes or if you have further questions!
I think we can live with loosing the line breaks. Just have to remember not to use line breaks when entering commit comments which should be short anyway.
Hi Patrick
I have found one more issue.
In the previous release notes we had a link to the build on Azured Devops
Based on this documentation there is no Build URL.
Is there a way to get that for a release?
Thank you
Fabian
Thanks for getting back to me with your follow-up issue.
Youâre right that it doesnât look like thereâs a quick way to get the Build URL in your release notes, but after discussing it internally with my colleagues, there might be a few ways to do this. However, it may not be as straightforward as including a system variable to get the Build URL included. Because of that, I was wondering if you wouldnât mind providing me with a few more details on your use case for including the Build URL? I just want to make sure I fully understand how youâre planning on using the URL to give you the best answer I can.
Iâm waiting on hearing back from our developers on this in case weâve missed something obvious, or at least understand why this might not be easily accessible via something like a system variable, and Iâll let you know what they say.
Thanks for getting back to me, and apologies for my delay in responding.
Unfortunately, when we originally built this feature, we went with a package-centric model and the Build Information is tied to packages. Since there can be more than one package per release (and therefore potentially multiple Build Urls), we didnât include this feature. Because of that, the only real way to get the Build Url into the Release Notes would be by constructing it from the Azure DevOps side and passing it into the Build Notes. I donât have a good example of this, but let me know if you have questions in this area and I can see what guidance we can provide.
Our developers have informed me that theyâre currently rethinking Build Information, and the current model under consideration would support making the Build Url available to use in a release. I hope thatâs some reassurance we are aware of this limitation and currently working on making this better in future releases of Octopus.
Iâm sorry I donât have better news, but let me know if you have any questions.
Hi Patrick
Ok I understand. Itâs nice that you might support this again in the future.
For now weâll just have to go to the Build Information for a release to find the link to the Build.