How to import NuGet release notes into Octopus Deploy release

We’ve written a custom MSBuild task to retrieve the last TeamCity change (the one that triggered a build on the TeamCity server) and insert change details into a release notes file. This file is passed in the --releaseNotesFile paramter to Octo.exe. This is working well in that we can now see changeset details from TFS in our NuGet package info in Octopus Deploy. However, we’d now like to import the release notes from the NuGet package we select when we create a release into the Release Notes field. Can you give me a hint as to how we can do that (from the UI). It seems like we’re looking for the following logic: “When choosing a NuGet package to create a release from, if that NuGet package has release notes then populate the Release Notes field.”

Thanks,
Chris

Hi Chris,

Thanks for getting in touch! Octopus takes the release notes from the NuGet package, and reads them into the UI. However we heavily sanitize the contents for security reasons. One way to check if this is the case, is to go to the release and click Edit. Can you see your release notes in the field? If there is anything wrong with tag structure it won’t show in the interface.

Let me know what you find.
Vanessa

Vanessa,

We finally figured out that the NuGet release notes would propagate to the Release after we created a release. They even rendered nicely:

[cid:image001.png@01D049CF.5F7CB290]

Thanks for the assist,
Chris

image001.png

Hi Vanessa,

We are using version 3.2.15 and I don’t see the below behavior happening. I create a nuget package with release notes and push the package to Octopus Server via api. The release notes is not showing in the Octopus release notes UI. Do I need to do anything else to be able to accomplish this? BTW, we are not using octopack.

Octopus takes the release notes from the NuGet package, and reads them into the UI

Hi @Kong,

If you aren’t using OctoPack then you will need to make sure that your release notes are in the release notes metadata associated with your package.
As OctoPack will build a NuSpec, without it you will need to be sure this is part of your process.
Some documentation on metadata regarding NuSpec: https://docs.nuget.org/create/nuspec-reference

Vanessa

Hi Vaness,

We do populate the release notes metadata but the text does not appear on the Release Notes in Octopus Deploy. I have attached a couple of screenshots for your review.

2016-06-27_13_23_04-Edit_release_1.0.0.0_-_Octopus_Deploy.png

2016-06-27_13_22_24-NuGet_Package_Explorer_...m.Customizations.1.0.0.0.png

Hi @Kong,

We do not populate the release notes for the release from any package, but as you can see from the screenshots in this thread, the release notes for a package are displayed below the package name on the release page.
If you want to insert release notes for the actual release you will need to use octo.exe create-release with the release notes flag.

Vanessa

Any workaround to programmatically set the actual release during the deployment process via powershell? The ultimate goal is to be able to programmatically include the release notes (or description) metadata of a nuget package in post-deployment notification.

Hi Sommai,

How are you creating the release itself? Where is the release creation completed in the automation pipeline? There are a few ways to include release notes.

Vanessa

Hi Vanessa,

We use the ‘Automatic Release Creation’ feature in OD.

[cid:image001.png@01D1D12A.9C23D280]

“Import Solutions” step uses custom PowerShell deployment script to connect to MSCRM online and deploy MSCRM solutions.

[cid:image002.png@01D1D12A.9C23D280]

I was hoping to be able to retrieve the release notes from the metadata of the nuget package to be deployed and set the actual release notes in Octopus Deploy using powershell. However, I was unable to find a way to do so.

Thanks,
Sommai

image001.png

image002.png

Hi Sommai,

If you are using that feature then you cannot automate release notes.

Vanessa

Vanessa,

Is that true even using the Octopus add-in for TFS 2015. Just curious as we’re thinking about utilizing that when we upgrade.

Hi Michael,

Using TFS, or the new VSTS templates you can create release notes as they use the octo.exe create-release features.

Vanessa

Awesome, thanks!