0

I am trying to modify the publish profile by adding a new element which i can use for my Deploy-FabricApplication.ps1 but when I publish it, I get an error saying there is an error in XML document. It looks like the XML profile schema is getting validated first. Is there a work-around for this or is the publish profile is not the place to put this. This additional element in the publish profile will be used for deployment only like parameters for sending messages/notification. I don't want to hard-code the parameters in my Deploy-FabricApplication.ps1. I thought the publish profile will be an ideal since each target environment will have it's own profile already.

alltej
  • 6,787
  • 10
  • 46
  • 87
  • If this is configuration for your services, you should be using the configuration files. https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-manage-multiple-environment-app-configuration – Mikkel Mørk Hegnhøj Jan 18 '17 at 17:48
  • this is not configuration for services – alltej Jan 18 '17 at 18:17
  • Can you be more specific about what you need to pass through via the publish profiles? I'd like to understand your scenarios to help figuring out a workaround. – Mikkel Mørk Hegnhøj Jan 18 '17 at 22:14
  • I need to add post-deploy parameters that `Deploy-FabricApplication.ps1` requires and are also environment specific. – alltej Jan 20 '17 at 17:05

1 Answers1

2

The publish profile has a fixed schema. You can't add custom elements to it. You'll need to place that information in your own file.

Matt Thalman
  • 3,540
  • 17
  • 26
  • Since each profile contains specific environment parameters, I thought that the profile can be a good place for post-deploy parameters like notification parameters. I am adding scripts in the `Deploy-FabricApplication.ps1` to notify a group that requires also environment specific parameters. – alltej Jan 20 '17 at 17:03
  • Is it possible to put that functionality in a separate script and/or a separate config file, that you define and own, and just call that script from Deploy-FarbicApplication.ps1? – Mikkel Mørk Hegnhøj Jan 21 '17 at 06:56