Side by side API deploy

Hi,

We have multiple public APIs that are versioned. Looking for an easy way to deploy these so that Major and Minor creates a new site but build number version update the version of which its major and minor is for that release. It also needs to keep every version that has been set up in IIS as an application.

Part of this that is also complicated is that each one is converted to an “Application” in IIS.

Example

*domain/v1.0.123 (Live Version for 1.0)
*domain/v1.1.124
*domain/v1.1.125 (Live Version for 1.1)
*domain/v2.0.130 (Live Version for 2.0)

Thanks for any help.

Sorry that formatting got removed.

*domain/v1.0.123 (Live Version for 1.0)
*domain/v1.1.124
*domain/v1.1.125 (Live Version for 1.1)
*domain/v2.0.130 (Live Version for 2.0)

Hi,

How are you currently updating IIS - using the inbuilt Octopus settings or a PowerShell script? You could use the first two parts of the version number to determine the IIS site to update. In a PreDeploy.ps1 script you could do:

$version = $OctopusReleaseNumber  # Example: 1.0.123

$versionMajor = $version.Substring(0, $version.LastIndexOf('.'))  # Now: 1.0

Set-OctopusVariable -Name "$OctopusWebSiteName" -Value "App.$versionMajor"

Tentacle will now look for a site named “App.1.0” when you deploy release 1.0.3.

Does that help?

Paul