Hyperlinks in email

I want to create an email template that has the Octopus package, and also lists all the nuget packages with the related version number. I would like to make the nuget version a hyperlink to the TFS build summary. Has anyone done this or thought about doing this? The only connection between TFS and Octopus is the nuget package, so I’m guessing I’d have to include the link in the nuget package somehow during the TFS build process.

If anyone has thought about this, I’d like to hear about it.

Hi, I’ve just run through this, at least from the Octopus side, and came up with the template below:

<h1>Deployment of #{Octopus.Project.Name} #{Octopus.Release.Number} to #{Octopus.Environment.Name}</h1>
  <em>Initiated by
    #{unless Octopus.Deployment.CreatedBy.DisplayName}#{Octopus.Deployment.CreatedBy.Username}#{/unless}
    #{if Octopus.Deployment.CreatedBy.DisplayName}#{Octopus.Deployment.CreatedBy.DisplayName}#{/if}
    #{if Octopus.Deployment.CreatedBy.EmailAddress} (<a href="mailto: #{Octopus.Deployment.CreatedBy.EmailAddress}">#{Octopus.Deployment.CreatedBy.EmailAddress}</a>)#{/if}
#{if Octopus.Release.Notes}
<h2>Release notes</h2>
<h2>Deployment process</h2>
<p>The deployment included the following actions:</p>
  #{each action in Octopus.Action}
    <li><strong>#{action.Name}</strong> #{if action.Package.NuGetPackageId}&mdash; <a href="http://nuget.org/packages/#{action.Package.NuGetPackageId}">#{action.Package.NuGetPackageId}</a> <em>version #{action.Package.NuGetPackageVersion}#{/if}</em></li>
<p>View the <a href="http://my-octopus#{Octopus.Web.DeploymentLink}">detailed deployment log</a>.</p>

It would be great to hear how you end up routing these links to TFS, I’m not sure personally how to format the URLs.

Nick - thanks. I’ll give it a go.

Also, is there a way to not print the actions in email list that are skipped or don’t apply to that environment? Basically, i want just the actions that executed.

I’m looking at the API and I see the SkipActions list, but I’m not sure what variable I could reference in the email to base that if statement on. If there’s a place in the docs that has this detail, please point me to it.


Hi David - no, not currently; if you can add a list of things you’d ideally have available to include it would be very useful for us (via a GitHub issue would be ideal).


Done -