开发者

Where to place deployment scripts in source control in a CI Configuration?

开发者 https://www.devze.com 2023-03-19 14:48 出处:网络
I am working on a distributed solution (written in .NET) that includes WCF services, Windows managed services and has dependencies to other native and managed solutions. The primary goal of the projec

I am working on a distributed solution (written in .NET) that includes WCF services, Windows managed services and has dependencies to other native and managed solutions. The primary goal of the project is to perform various testing of another distributed system.

The build is deployed with one click in TeamCity. The binaries of test harness and the tested distributed s开发者_高级运维ystem go to the shared folder. To deploy it all I have a few .bat and powershell scripts which also live in the shared folder. I constantly work on the scripts and they get updated, so I want to keep them in the source control.

What are the possible locations to store deployment scripts?

Right now I have a dedicated folder in the solution, but I am not too sure this is a good approach. I haven't figured out the way to deploy scripts to the shared folder on each TeamCity build.

/solution
   /app [test harness code]
   /test [unit, functional, integration, capacity tests]
   /deployment 
      /scripts [.bat and .ps1 scripts only]
         /TeamCity [copy binaries to share folder on TeamCity]
         /VM [scripts for installation of test harness and unit under test]

UPDATE

Deployment scripts I am talking about should be stored in a shared folder on the Team City machine. In the testing scenarios several VMs copy these scripts to the local folders and then execute them. Depending on the script and VM assignment, different binaries are copied to the VM and different installations performed. Scripts are usually < 100 lines but are quite different from component to component and are constantly updated.

I store scripts in a Visual Studio solution folder without the .csproj file, and thus they are not copied when Team City checks out the code from repository, and thus I cannot copy them to the shared folder.


Looks fine to me. I usually do something similar if I will be performing continuous integration.

Edit: I just noted the part about deploying scripts to the shared folder. What do you mean exactly? Are your scripts also under source control?

0

精彩评论

暂无评论...
验证码 换一张
取 消