0

I am trying to run a PostDeploy.ps1 script using an Azure deployment. The nuget package has the PostDeploy.ps1 file in it, but the script is never run.

Why might this be? The only line in the script is currently:

Write-Host "Test Custom Deployment Script"

This text never appears in the log.

Jan Bluemink
  • 3,467
  • 1
  • 21
  • 35
ilivewithian
  • 19,476
  • 19
  • 103
  • 165

1 Answers1

0

Have you checked this location C:\Octopus\Applications.Tentacle\Packages to verify that the latest package has been downloaded?

I had an issue using Octopus and Teamcity where the artifacts view stated that the PostDeploy.ps1 had been added to the nuget package, but when I checked that location it wasn't there.

Octopus can cache the packages so check your timestamps and version numbers to ensure that the most up to date version of the package is being used. Could it be that an earlier version of PostDeploy.ps1 didnt have the

Write-Host "Test Custom Deployment Script"

line in it and that is the one that octopus is using during deployment?

Declan McNulty
  • 3,194
  • 6
  • 35
  • 54
  • I discovered that the wrong package was being deployed. I was using teamcity to create a package and then create and deploy the release. The problem was that teamcity wasn't releasing the package until the end of the build (after octo deploy had created a release). Chained builds with snapshot dependencies seem to have fixed the issue. – ilivewithian Mar 05 '14 at 17:00