Add package extraction to IIS deploy (Phase 10)
Summary
Operator stages a .zip or .nupkg archive on the Tentacle agent, points the action's Squid.Action.IISWebSite.Package.SourcePath at it, and the deploy script extracts the archive into WebRoot BEFORE any config rewriting.
This unlocks Octopus's UI "Package installation directory" path mode and brings the workflow from "manually script package staging" to "point at a staged file; Squid handles extract + IIS configure in one step."
Phase 10 MVP: operator-pre-staged paths only. Server-side feed-fetching to ship the package via ScriptExecutionRequest.Files is future work (Phase 10.5).
What ships
Production (+90 LOC)
| Change | Notes |
|---|---|
| 3 new constants |
PackageSourcePath + PackageExtractTo + PackagePurgeBeforeExtract
|
Expand-IISPackage PS1 |
.zip direct via Expand-Archive; .nupkg copied to temp .zip for Expand-Archive compatibility |
| Default ExtractTo → WebRoot | Operator can override for staging-dir workflows |
| Hook FIRST among pre-IIS hooks | Matches Octopus: extract → substitute → transforms → vars → IIS configure |
Test code (+280 LOC, 6 new tests)
| Tier | New | What |
|---|---|---|
| Drift detector | 1 | Function presence; extensions; WebRoot fallback; PurgeBeforeExtract; hook position FIRST |
| Unit | 1 | All 3 properties in preamble |
| Real-host | 4 | .zip extracted to WebRoot; PurgeBeforeExtract deletes prior; no-purge preserves prior; missing-path throws actionable error + aborts before IIS configure |
Octopus alignment
-
Operator-staged paths: Octopus has full feed-fetch infra (
Octopus.Action.Package.FeedId+PackageId); Squid Phase 10 covers the LAST mile (extract on agent), defers upstream "Squid fetches + ships" to Phase 10.5 -
PurgeBeforeExtract: matches
Octopus.Action.Package.PurgeInstallationDirectory -
Hook order: matches
DeployPackageCommand.cs:110-115
Cumulative state after Phase 10
- Unit: 72 → 74 (+2)
- Real-host: 54 → 58 (+4)
- Octopus feature surface: 8/8 complete! All operator-visible IIS-deploy features (Package + Substitution + Transforms + ConfigVariables + StructuredConfig + IIS configure + App pool + Bindings + Auth + Custom scripts) ship as a single Squid action
Test plan
-
dotnet test --filter FullyQualifiedName~IISDeployon macOS — 74 unit tests green -
dotnet test --filter Category=IISDeployE2Eon macOS — 58 real-host tests skip cleanly -
dotnet build0 errors -
CI run on windows-latest: 4 new package-extraction tests against real.ziparchives
Out of scope
- Phase 10.5: Server-side feed-fetched package shipping
- Phase 11: Custom installation directory + purge variant
- Phase 12: IIS cert auto-import + private-key ACL
Breaking-change risk
None. Pure additive: 3 new properties, new PS1 function + gate (no-op when SourcePath empty).