I've got an Azure Resource Group-project (.deployproj) in Visual Studio which deploys fine. It is containing a DSC.ps1 file and a CustomScripts.ps1 file which is referenced by the template.json.
I want to deploy this project from TeamCity, but I can't find the way to build the project. During deploy Visual Studio outputs:
11:01:21 - Build started.
11:01:21 - Project "AzureResources.deployproj" (StageArtifacts target(s)):
11:01:21 - Project "AzureResources.deployproj" (ContentFilesProjectOutputGroup target(s)):
11:01:21 - Done building project "ESS.AzureResources.deployproj".
11:01:21 - Done building project "ESS.AzureResources.deployproj".
It seems it puts the DSC.ps1 file inside a zip-archive together with some dependencies before it runs the Deploy-AzureResourceGroup.ps1
which in turns does the deploy. The output of the build is put in bin/Debug/staging
.
How can I perform the build from TeamCity/command line? Through msbuild?
I don't think the .deployproj has a deploy action, only build. To deploy you'd need an additional step in TeamCity to invoke the Deploy-AzureResourceGroup.ps1 and point it to the build output.