0
votes

We have an Azure Cloud Service being deployed by Octopus Deploy. It started to fail with the error "Your package does not appear to contain any Azure Cloud Service package (.cspkg) files." This is odd since it used to succeed, and no code has changed in this project.

Here are the log lines describing the failure:

Verbose  | Invoking target script C:\Windows\system32\config\systemprofile\AppData\Local\Calamari.Azure\Temp\2a0a164b-5ce8-4840-82a6-1972fcb6a3d0\SwapAzureCloudServiceDeployment.ps1 with  parameters
Verbose  | Extracting package to: C:\Octopus\Work\20160716115609-9\staging
Verbose  | Extracted 0 files
Error    | Your package does not appear to contain any Azure Cloud Service package (.cspkg) files.

This same code used to produce the following log lines:

Verbose  | Invoking target script C:\Windows\system32\config\systemprofile\AppData\Local\Calamari.Azure\Temp\9008e8af-46e5-4d57-a5d6-4cac4e677ab5\SwapAzureCloudServiceDeployment.ps1
Verbose  | Extracting package to: C:\Octopus\Work\20160504231837-40
Verbose  | Extracted 4 files
Verbose  | Ensuring cloud-service-package is V20120315 format.
Verbose  | Package is V20120315 format.
Verbose  | Extracting Cloud Service package: 'C:\Octopus\Work\20160504231837-40\Transactions.cspkg'

The Octopus server and Tentacles are version 3.3.10 in both cases.

The nuget package is available, and when I download an extract them, the contents are the same, except for build dates and identifiers.

What could have changed and cause the failure?

1

1 Answers

0
votes

The cause of this failure is Nuget 3.4.3. It appears to be fixed in 3.4.4+.

The packaging seems to create a subfolder with a blank name in the zip, which you can see if you open it in a GUI like 7zip's. Just extracting it puts the contents of this blank name folder in the root, so it is concealed. The way Octopus extracts the package appears to miss these files, and the cspkg is not found, failing the deployment.

Invalid package with blank folder name

NOTE: Nuget 3.4.4 has been released, but somehow still shows up only in the prerelease feed when using Install-Package Nuget.CommandLine. This is a known issue, not sure why it's still pre-release.