Install and use the self-built TeamCity Tool
Install and use the self-built TeamCity Tool
Chapter 4 installation steps
2.2 Software Installation
2.2.1 installation package location
\ 192.168.0.5 \ persons \ Download Software \ TeamCity-8.1.5.exe
Attached installation package
\ 192.168.0.5 \ persons \ Download Software \ WDeploy.exe
2.2.2 Installation
Click the Teamcity-8.1.5.exe to follow the prompts to install, after the installation is complete, there is a file in the installation directory plus TeamCity
The website used for management is also configured.
Enter the configured address in the browser to open http: // localhost: 8080/login.html
Enter admin and admin (Default Administrator Account) (the Administrator account must be created for the first time)
Vce1xCBhZG1pbmlzdHJhdG9yvLS/hybrid + m1ydxicj4kidxicj4kpgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20150120/20150120101153145.jpg" alt = "\">
2.2.3 WDeploy.exe web Deployment Service Installation
WDeploy.exe is a web Deployment Tool of Microsoft. It is used when a web site is released. Click "Install", customize the installation, and select all items for installation.
After the installation is complete, go to control panel-management tools-services,
MsDepSvc and WMSVC are set to automatically start and start, for example:
Chapter 1 software use this example describes how to configure and manage a project by using the self-built ***. Webapi
3.1 create a project and enter administrator.
Click create project to go to The create page.
Enter information to complete Creation
3.2 configure project click the drop-down icon in the upper left corner to select the project you just created.
Click the drop-down icon on the right of the project and select edit Settings.
3.2.1 General Settings
The upper part can be modified.
Click Create Build configuration
Click edit in the build list to go to the build configuration page.
3.2.1 .. 1 Build Configuration Setttings
General Settings
You do not need to modify this part of information.
Version Control Setting
The input information is as follows:
Build Steps build Steps are divided into ten Steps (dev), that is, add ten Build Steps, respectively, as follows:
Step 1-4: Restore the nuget package
5-7: Automatic project Compilation
8-10 is automatically generated for the document
Step 1:
Runner type: select the appropriate type nugget Installer
Step name: custom
For Excute step, select If all previous steps finished successfully.
Nugget Settings: default 2.8.3 does not have this option set from the following nugget settings.
Path to solution file: select the solution for restoring the nuget package
Step 2:
Same as above, nuget is generally based on sln. Note that, if the path of the project file under the solution is adjusted, it is best to delete the reference of the package in the solution management nuget package and then add it. Otherwise, the dll cannot be found in teamcity compilation.
Step 3:
Same as above
Step 4:
Same as above
Step 5:
Runner type: select the appropriate type MSBuild
Step name: custom
Path to solution file: select the project file to be compiled csproj
MSBuild version: Microsoft Build Tools 2013
MSBuild ToolsVersion: 12.0
Run platform: x86
Targets: rebuild
Command line parameters:
/P: ReferencePath = ".. \ Lib \ Public; .. \ Lib \ Aliyun_dotnet_SDK \ bin"
/P: Configuration = TestServer
/P: OutputPath = bin
/P: DeployOnBuild = True
/P: DeployTarget = MSDeployPublish
/P: MsDeployServiceUrl = https: // 192.168.0.106: 8172/msdeploy. axd
/P: username = Administrator
/P: password = ***
/P: AllowUntrustedCertificate = True
/P: DeployIisAppPath = webapi. dev
/P: MSDeployPublishMethod = WMSVC
/P: EnableMSDeployAppOffline = true
/P: MSDeployUseChecksum = true
Note:
ReferencePath references other than nuget package references
Configuration is used to configure debug, release, and custom Configuration. Optional.
OutputPath output path
Change the IP address in MsDeployServiceUrl to the ip address of the target website.
Username and password are the account information of the target machine.
DeployIisAppPath is the website name of the target website.
. NET Coverage tool: <No. NET Coverage> because No automatic test is performed, select this
This is generally the compilation settings of webapi.
If the website project created in vs2013 does not have a proj file, you can publish the website on the website project so that there will be a website. publishproj file, but there is a problem after such a file is compiled. The referenced third-party packages and the system packages to be used cannot be compiled into the bin. I manually modify the website. the publishproj file is resolved. As follows:
Add a package to be used but not available in itemgroup (red part)
<ItemGroup>
<AssemblyAttributes Include = "AssemblyFileVersion">
<Value> $ (AssemblyFileVersion) </Value>
</AssemblyAttributes>
<AssemblyAttributes Include = "AssemblyVersion">
<Value> $ (AssemblyVersion) </Value>
</AssemblyAttributes>
<Reference Include = "System. Diagnostics. Tracing"/>
<Reference Include = "System. Runtime"/>
<Reference Include = "System. Runtime. InteropServices"/>
<Reference Include = "System. Diagnostics. Tracing"/>
<Reference Include = "MongoDB. Bson">
<HintPath>... \ packages \ export csharpdriver.1.9.2 \ lib \ net35 \ MongoDB. Bson. dll </HintPath>
</Reference>
<Reference Include = "MongoDB. Driver">
<HintPath>... \ packages \ export csharpdriver.1.9.2 \ lib \ net35 \ MongoDB. Driver. dll </HintPath>
</Reference>
<Reference Include = "log4net">
<HintPath> .. \ packages \ log4net. 2.0.3 \ lib \ net40-full \ log4net. dll </HintPath>
</Reference>
<Reference Include = "AspNetPager">
<HintPath>... \ .. \ packages \ AspNetPager.7.4.3 \ lib \ AspNetPager. dll </HintPath>
</Reference>
</ItemGroup>
The paramline settings for website project build are as follows: slightly different from webapi/p: OutputPath = bin
/P: Configuration = Debug
/P: DeployOnBuild = True
/P: DeployTarget = MSDeployPublish
/P: MsDeployServiceUrl = https: // 192.168.1.9: 8172/msdeploy. axd
/P: username = Administrator
/P: password = ***
/P: AllowUntrustedCertificate = True
/P: DeployIisAppPath = Promotion
/P: MSDeployPublishMethod = WMSVC
/P: EnableMSDeployAppOffline = true
/P: MSDeployUseChecksum = true
Step 6:
Step 7:
Same as above
Step 8:
/P: OutputPath = "C: \ Help \ entity" when the output path is inconsistent with that in the project, You can reset this path.
*. Shfbproj is a project created by Sandcastle Help File Build. For details, refer to examples.
Step 9
Same as above
Step 10:
Same as above
Build step is the most important and cumbersome step in self-built settings. just refer to the configuration.
Tiggers
That is, set the conditions for triggering the build.
Failure Contitions
No need to set
No need to set Build Features
Dependencies
You do not need to set Parameters.
No need to set the Agent Requirements,
3.2.2 VCS Roots
Same as version library settings in build step
3.2.3 no need to set Report Tabs
3.2.4 no need to set Parameters
3.2.5 no need to set Builds Schedule
3.2.6 no need to set Shared Resources
3.2.7 no need to set Maven Settings
3.2.8 no need to set Meta-Runners
3.2.9 no need to set SSH Keys
After the above settings are complete, as long as the version library has code and a new version, the automatic build will be triggered. After the build is complete, the success will be displayed. Otherwise, the exclamation point icon will be displayed. Click to see the cause of the error.