Reputation: 61
I have a build template configured with 5 parameters like Configuration,PublishProfile for msdeploy artefact packaging. My problem is that when I use the template I don't want each build step to use all the parameters only some. The reason is that
If all parameters are passed to msBuild for each build step packages are created three times. The only thing I can think of doing is to pass the parameters in via the command line option but then I can not use a template. Is there any way to configure a build step to remove a parameter before msBuild is called?
Upvotes: 2
Views: 955
Reputation: 3739
If you want to stick to a template and do not want to go the route of depedency chains/build chains , You can categorize your parameters into buildparams,testparams and deployparams. You can then pass buildparams into your build step ,your testparams into your test step and your config params into the config step.
I would however handle this using build targets than parameters.
Upvotes: 1
Reputation: 3081
You can split the configuration in two, one being for Build / Test, the other being for Package. Then define the parameters only in the configurations that need them, and create a snapshot dependency from Package to Build / Test.
Build / Test -> Package
You can then cherrypick when you package manually, or, if you want to actually package every time there's a build, then put a VCS trigger on the Package config and remove it from the Build / Test config. This will automatically trigger a build chain.
Hope that helps.
Upvotes: 1