Mark Siedle on 17 Jul, 2017 01:40 AM
Thanks for getting in touch.
Can you confirm if you've previously deployed to this SF cluster using Octopus before? Has this only just started failing, or is this your first deployment to SF using Octopus?
The message seems to suggest there's a problem addressing your ApplicationManifest.xml file (or some reference within that file). Could you confirm if your SF package is structured correctly for use with Octopus (specifically your ApplicationManifest.xml file, as per the example in this documentation.
Can you currently redeploy to SF manually with Visual Studio? ie. Is this problem only occurring if you're using Octopus? It may be worth testing that you can redeploy with Visual Studio to see if the same error occurs there. If so, that may help track down if there's a problem in your package.
If that doesn't help, you can debug the PowerShell script by overriding the default script we bundle in Calamari for Service Fabric steps. See the Customizing the deployment process section of the SF documentation. This documentation will point you towards the bundled script that you can override (and if you search this script, you will see "Test-Path $_ -PathType Leaf" which appears in your error message). This may help you track down exactly where/why the script is failing in your case.
This is the first tie we are deploying to SF via octopus, we were doing deployments via Visual Studio before. The error we are getting is mainly because the files are not being copied from repo to work directory. I can hard code the path to the profile file and I can get passed this error. But that is not the best way.
Do certain variables need to be created /added to reference files ?
Mark Siedle on 18 Jul, 2017 01:39 AM
For SF packages to work in Octopus, they need to be structured a certain way (because when deploying straight from Visual Studio, the profile and parameters files are referenced from the source code, but when deploying through Octopus, they must be included in the NuGet/Zip package so they are available at deployment time).
We have a useful guide here that you can read through to make sure your package includes all the files/folders needed for SF deployments with Octopus. We highly recommend the Custom build targets section, but the documentation lists several methods that you can compare and contrast for your specific needs.
Once you have packaged your application, you can compare it to the "Final Package Structure" section of the above documentation before trying to deploy your package with Octopus. It should then contain all the files it needs for the deployment without you needing to hardcode paths to certain files etc.