BTDF / DeploymentFramework

The Deployment Framework for BizTalk is the most powerful and customizable, yet easy-to-use toolkit for deploying and configuring your BizTalk solutions.
MIT License
53 stars 24 forks source link

Feature request: Support skipping ExportSettings target #453

Closed eloekset closed 5 years ago

eloekset commented 5 years ago

Ref #451, I'm using Octopus to provide values for a special environment resulting in Octopus_settings.xml.

I've opened this PR to explain the purpose of the feature request: https://github.com/eloekset/publish-btdfBiztalkApplication/pull/7

One possible way this requirement can be met, is to provide a condition to this target definition:

<Target Name="ExportSettings" DependsOnTargets="GetSoftwarePaths;CustomPreExportSettings">

If a condition like Condition="$(SettingsFilePath) == ''" is added, I'm able to make the main target skip overriding my prepared Octopus_settings.xml file when I pass that parameter to MSBuild like this:

$deployOptions = @{"/p:VDIR_USERNAME"="$($appPoolIdentity)";
   "/p:VDIR_USERPASS"="$($appPoolPassword)";
   "/p:BTSACCOUNT"="biztalk";
   "/p:SettingsFilePath"="""$($octpousEnvironmentSettingsPath)""";
}

Does this sound like a feature request that will be accepted, or is there an existing workaround that I can use instead?

eloekset commented 5 years ago

I've found that $(SettingsFilePath) cannot be used as condition as I suggested, because it will be set to a value anyway before the ExportSettings target runs.

Instead I suggest that a new property $(SkipExportSettings) gets introduced to be used by the condition. I've tested this implementation in my solution, and it works like I want. I'll send a PR from my feature branch.

eloekset commented 5 years ago

I'll close this issue, since there's a workaround as described in PR #454

eloekset commented 5 years ago

For anyone interested in using BTDF from Octopus Deploy, I've now created a wiki page to describe the process using the PowerShell module that I mention in this issue: https://github.com/eloekset/publish-btdfBiztalkApplication/wiki/Octopus-Deploy