Azure build configurations and service configurations

To paraphrase this rather long question:

Why would you need more than two build configurations for your project when used in conjunction with service configurations?

I have a cloud service containing several websites that need to be deployed on several Azure platforms, one for Test, one for UAT and one for Live.

Each environment requires a different site header specific to the website it deploys, for example. test.myportal.com, test.myservice.com, uat.myportal.com, uat.myservice.com, live.myportal.comAnd live.myservice.com.

This means that I need to define a ServiceDefinition for each environment, so far.

In previous related questions I saw ( Azure: is there a way to deploy different instance sizes for testing / production , Best practice for the Azure connection string (step 4 and using $(Configuration)instead $(TargetProfile)in the .ccproj file), people mentioned that you will need X configurations (which means assembly configurations.) This does not mean, For me it makes sense, since I only need two assembly configurations (Debug and Release) for the way to create the code , and not for the configuration., I need three service configurations.

My question is, do I correctly believe that the assembly configuration should be used only for how the code is generated and that people who create several different assembly configurations for the service configuration are mistaken? (This is not the best word to use, I admit)

To clarify how I implement the solution around this, I continue below:

I am setting up my CI build server for MSBuild to take an additional parameter TargetProfilenext to Configuration.

The MSBuild commands for my environments are as follows:

For the test:

msbuild mySolution.sln /p:TargetProfile=Test /p:Configuration=Debug

For UAT

msbuild mySolution.sln /p:TargetProfile=UAT /p:Configuration=Debug

For live

msbuild mySolution.sln /p:TargetProfile=Live /p:Configuration=Release

For my cloud service I use ServiceDefinition.csdef three files, one for each environment: ServiceDefinition.Test.csdef ServiceDefinition.UAT.csdef ServiceDefinition.Live.csdef. They are stored in the '/ config /' folder.

In my ccproj file for the cloud server, I have only two configurations, debugging and release, with the task in BeforeBuild:

<Target Name="BeforeBuild">
  <Copy SourceFiles="configs\ServiceDefinition.$(TargetProfile).csdef" DestinationFolder="$(OutputPath)" />
  <Move SourceFiles="$(OutputPath)ServiceDefinition.$(TargetProfile).csdef" DestinationFiles="$(OutputPath)ServiceDefinition.csdef" />
</Target>

, , , , TargetProfile, MSBuild.

:

, , , , , ?

+4
1

, . , (, # ) .

0

All Articles