The previous article said Jenkins+webdeploy+iis completed the Web project deployment, which continues with the deployment of Windows service.
Windows service is typically used for automated tasks, and certain actions are scheduled to complete. This article automatic task use quartz.net+topshelf, about topshelf can refer to the garden article http://www.cnblogs.com/jys509/p/4614975.html, not the focus of this article, will not repeat.
1. Environment
Platform:. Net4.5
Ide:visual Studio & MsBuild
Package Management: NuGet
Version control: Tfs-git
Server: Windows R2
2. Configuration
The general configuration and the Web deployment are consistent, here or directly posted:
Description: 1. This section configures the "Source management" section, chose none, because this job is triggered after the main station is built, so the source code has been pulled complete, do not need to continue to pull, if you want to build independently, you can choose the appropriate SCM, configuration and the previous article is consistent.
2. After build, use the Topshelf command to uninstall the currently running service to facilitate subsequent copy installation
3. "xcopy" C:\repo\Sample \src\sample. Job\bin\release\*.* "" C:\web\autojob\ "/k/y" This command copies all files in the Release folder to the destination folder
4. Final install and start installation and startup Windows service
. Net Continuous Integration--windows Service