I have a Deploy to Service Fabric cluster step provided by Octopus Deploy and in the post deploy script I try to deploy the Patching Orchestrator App provided by Microsoft.
The step is already connected to the cluster in the post-deploy section
This is what I am trying to run:
Copy-ServiceFabricApplicationPackage -ApplicationPackagePath $ApplicationPackagePath -ImageStoreConnectionString $ImageStoreConnectionString -CompressPackage -ApplicationPackagePathInImageStore $ApplicationPackagePath
Register-ServiceFabricApplicationType PatchOrchestrationApplication
New-ServiceFabricApplication fabric:/PatchOrchestrationApplication PatchOrchestrationApplicationType $ApplicationVersion -ApplicationParameter $ApplicationParameters
Register-ServiceFabricApplicationType run from my PC goes fine, but when I run the exact same lines from the Octopus post-deploy script, I get this error.
"Register-ServiceFabricApplicationType : The BuildLayout of the application in D:\SvcFab\ImageBuilderProxy\AppType\67e94be3-a595-4fc3-ae02-4ae25363c653 is invalid. ServiceManifest.xml is missing for service CoordinatorServicePkg.
At D:\Octopus\Work\20191108162838-433566-138623\staging\Octopus.Action.CustomScripts.PostDeploy.ps1:23 char:1
- Register-ServiceFabricApplicationType PatchOrchestrationApplication
- CategoryInfo : InvalidOperation: (Microsoft.Servi…usterConnection:ClusterConnection) [Register-ServiceFabricApplicationType], FabricException
- FullyQualifiedErrorId : RegisterApplicationTypeErrorId,Microsoft.ServiceFabric.Powershell.RegisterApplicationType "
I even tried running these commands from an RDP connection in the octopus server itself, and they ran fine.