How to push build information if package will be resolved during deployment?

Hi there,

we would like to push build information from our CI tool (CircleCI) so that it is displayed on the release note.

This works great for static package references, i.e. when the package ID doesn’t contain any variables.

However, some of our packages contain variables and hence are dynamically selected at deploy time:

This is because we’re deploying different flavors of the package (think: Debug vs Release) to different environments.

Is it possible to push build information for a “dynamic” Package ID (containing a variable) so that it shows up in the release notes?

The following is not accepted by the CLI:

$ octo build-information --package-id=StackExchange.Website.#{Configuration} ...
...
Pushing build information for package "StackExchange.Website.#{Configuration}" version "2.1.12"...
There was a problem with your request.

 - The package ID contains invalid characters. Examples of valid package IDs include 'MyPackage' and 'MyPackage.Sample'.

Error from Octopus Server (HTTP 400 BadRequest)
...

Update: it looks like pushing the same build information for all configurations…

$ octo build-information --package-id=StackExchange.Website.Debug ...
$ octo build-information --package-id=StackExchange.Website.Release ...

… and adding a release note like

#{each package in Octopus.Release.Package}
Package: #{package.PackageId} #{package.Version}
#{each commit in package.Commits}
[#{commit.CommitId}](#{commit.LinkUrl}) - #{commit.Comment}
#{/each}
#{/each}

somehow works: on the release page, although it says “Package will be resolved during deployment” in the “Packages” section, the “Release notes” section renders the commits of the StackExchange.Website.Release package.

It would be interesting to understand what is going on here and if we’re doing this right.

Hello @mhorstmann,

Thanks for reaching out!

To better explain what might be happening with the release notes, could you tell me how the Configuration variable is scoped? I believe you mentioned that it changes based on the environment, but I didn’t want to assume.

Thanks

Best regards,
Mark Butler