Failed Deployment and Renention

Morning

Simplified scenario - I have a project with two steps, the first deploys a nuget package containing an IIS website (without updating IIS). The second step runs a Deploy.ps1 to update multiple IIS sites to point at step 1s website.

I have a retention policy which keeps the last 3 items.

I then deploy version 1.0.0.0 which is successful - IIS points at the correct versioned location.

If I then deploy versions 1.0.0.1, 1.0.0.2 and 1.0.0.3 and they all fail on step 2, ie IIS was never updated with the new version folder mapping.

The retention policy will then clear up version 1.0.0.0 which means all the IIS Site mappings are incorrect because they still point at the last successful deployment (version 1.0.0.0).

Any ideas how this situation can be overcome?

I could set the retention policy to the last 10 items, but what if all 10 fail…that can lead to the same situation but I then need to store large amounts of data.

I see you can also set retention by number of days… how does this setting work? If you set the number of days to 5 and you install on the 6th day will it only retain the current copy?

The best outcome would be for the retention policy to take into consideration that the deployment has failed and to keep the last successful deployment.

Thanks for your help.

Graham

Hi Graham,

Thanks for reporting this, it is indeed a problem. We’re going to review retention policies before Octopus 2.0 ships and I’ll make sure we take this issue into account.

Paul