Azure devops create release extension changeset comments

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.
image
With version 5 those options are gone.

Do you have a way with version 5 extension to include change set comments?

Thank you
Fabian

Hi Fabian,

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!

Best,
Patrick

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.

Do you have a fix for that?

Thank you

Fabian

Hi Fabian,

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.

I’m hoping this is what you’re after Fabian! Please reach out if we can help you with anything else.

Kind regards,
Lauren

1 Like

Wow Lauren, this is very useful.

I tried this and it works.

Is there a way to store the release notes template globally instead of hard coding it in each Octopus Project?

Thank you
Fabian

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?

Here’s the template I use. #{commit.Comment} doesn’t seem to show the line breaks?

#{each package in Octopus.Release.Package}

  • #{package.PackageId} #{package.Version}
    #{each commit in package.Commits}

Thank you

Hi Fabian,

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:

  1. Create a Library Variable Set under Library > Variable Sets (or use an existing one)

  2. Add a new variable and set the value of the release notes by clicking ‘Open Editor’ and pasting in the release notes template:

  3. In your project, add the Library Variable Set under Variables > Library Sets

  4. Set the Project Release Notes Template (under Deployments > Settings > Release Notes Template) to your variable (e.g. #{ReleaseNotesVariable}):

That should populate the release notes on the Releases Page when you create a new release:

image

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!

Best,
Patrick

1 Like

Hi Patrick

Fantastic. That worked.

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.

Thank you

1 Like

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

Hey 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.

Best,
Patrick

Hi Patrick

When i run a build on Azure Devops on prem and use the old create octopus release extension the release notes look like this

you can see there is a link to the Build “ADBrowser #1.1.20220203.01”

When i use the new way with the Push Build information step and the Release Notes template it looks like this

I’d like ADBrowser 1.1.20220831.03 to be a link to the build that created this release.

Thank you
Fabian

Hi Fabian,

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.

Kind regards,
Patrick

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.
image
Not too bad.
Thank you
Fabian

1 Like

Hi Fabian,

Thanks for understanding and for letting me know you found something you can work with until this feature is supported again.

If you need anything else just let us know and we’ll be happy to help!

Best,
Patrick

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.