Daily build (2)
In the past, when I was working on a project, I didn't feel how important daily building was. The former company mainly made projects for the company, used projects by its own people, and did not feel how difficult it was to compile and deploy the projects, it was only after arriving at other companies that the time and energy it took to deploy each time was really frustrating.
Difficulty 1:The company has a lot of projects to deploy, and each project has its own source code, compilation, and release, which requires a lot of work, let alone the boring work.
Difficulty 2:Multi-language projects. Is implemented by dynamically loading controls, that is, each language creates a user control that shares the same backgroundCodeDuring deployment, we need to divide a project into sites with the same number of languages. That is to say, the Chinese site only contains controls for Chinese and only controls for English, in this case, the MS release function is not competent.
Difficulty 3:In the testing phase, the deployment frequency is usually very high in the later stages. In this way, if you manually complete the packaging, it will take too much time.
At present, there are many tools that can well complete the above functions, but most of them are not perfect. Either the problem is that there are deficiencies. Therefore, you can combine the features of several tools so that they can give full play to their respective strengths, here I use the following combination:
1: ccnet:It is an automatic management and monitoring tool for the process of code development; the included procedures include checking out code from the specified code library based on the set task, then automatically compiling, automatic code check, and automatic unit test, the compilation and testing results are recorded and fed back (by email, etc.), and a fairly good web application platform is presented. It also supports some analysis work. I mainly use it to control the process, because ccnet has a very useful web platform.
Reference: http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET
2: SVN:Source codeManagement tools.
3: msbuilder:It is mainly used to compile the project.
4:Nant:For more information, see http://nant.sourceforge.net.
5: WinRAR: Application: Incremental compression, that is, the compressed package only contains the file content modified after a certain time. This greatly reduces the package capacity.
Purpose:This article mainly shares the simple application of ccnet.
After downloading ccnet and installing it, a ccnet false directory will be generated by default, and we need to configure this before running to run ccnet. There is a server subdirectory under the ccnet installation directory, and the ccnet. config in it is what we need to modify. Ccnet supports multiple versions. For example, due to the inconsistent launch time of a Company project, several versions will be released for development. The configuration file uses the project node as the difference. A project node represents a project version. For more information about the configuration file, see the official website. Here I will summarize some simple and important nodes.
1: sourcecontrol:Source code management supports many source code management software. I use SVN here.
1>: trunkurl: Project path.
2>: workingdirectory: Local Project Storage path.
3>: executable: SVNProgramPath.
4>: Username: source code Username
5>: Password: source code User Password
6>: Timeout: timeout.
2: triggers:Trigger configuration. You can set the interval between two consecutive integration executions. Here I use intervaltrigger.
3: tasks:Task Configuration
1>: modificationwriter/modificationreader: These two nodes are mainly used to configure the log of File Modification records. The information of each updated project file is recorded in the file configured by the node.
2>: msbuild: Project compilation configuration.
(1): executable: C: \ WINDOWS \ Microsoft. NET \ framework \ v3.5 \ msbuild.exe. if the version is 2.0, You need to modify the version number.
(2): workingdirectory: the folder where the project solution is located.
(3): projectfile: solution file name.
(4): buildargs: Some parameter settings during compilation. You can specify the compiled version as release or debug.
(5): Timeout: timeout.
3>:Nant: ccnet directly supports Nant applications.
(1): executable: Nant program location.
(2): basedirectory: Location of the project file
(3): buildargs: parameters and content to be executed.
(4): buildfile: path of the Nant script file
4: publishers: Release related configuration and compilation result feedback settings. Subsequent operations after ccnet runs and releases, such as sending an execution result email to relevant personnel for reference and tracking.
1>: Exec: Mainly used to configure release settings.
2>: executable: batch file to be executed
3>: basedirectory: Directory address of the file where the batch file is located
4>: Email: email-related configuration.
(1): users: the email address of the user who receives the email.
(2): groups: contact list.
Shows the running interface:
To be continued ......