Daily integration in. NET environment (7): cruisecontrol. Net task Blocks

Source: Internet
Author: User

Task block type:

    • Build publisher
    • Email publisher
    • Executable task
    • File merge task
    • Finalbuilder task
    • Forcebuildpublisher
    • Modification writer task
    • Msbuild task
    • Nant task
    • Null task
    • Nunit task
    • Statistics publisher
    • Visual Studio task
    • XML log publisher

Tasks are executed sequentially. Here I only mention build publisher, nunit task, msbuild task, executable task, and email publisher.

1. Build publisher

How to publish after compilation is successful

< Buildpublisher >
< Sourcedir > C: \ myprojects \ project1 </ Sourcedir >
< Publishdir > \ Myfileserver \ project1 </ Publishdir >
< Uselabelsubdirectory > False </ Uselabelsubdirectory >
</ Buildpublisher >
 
Sourcedir: source file address
 
Publishdir: the address to publish.
 
<Uselabelsubdirectory>: whether or not each version creates a word directory based on the label Label and places the published content in it.
2. msbuild task
< Msbuild >
< Executable > C: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ msbuild.exe </ Executable >
< Workingdirectory > C: \ Dev \ ccnet </ Workingdirectory >
< Projectfile > Ccnet. sln </ Projectfile >
< Buildargs > /Noconsolelogger/P: configuration = debug/V: diag </ Buildargs >
< Targets > Build; Test </ Targets >
< Timeout > 15 </ Timeout >
< Logger > C: \ Program Files \ cruisecontrol. Net \ Server \ thoughtworks. cruisecontrol. msbuild. dll </ Logger >
</ Msbuild >
 
This does not need to be explained, but thoughtworks. cruisecontrol. msbuild. dll is a separate component, which I mentioned earlier
 
3. nunit task
 
Compile and run the test
< Tasks >
< Nunit > < Path > D: \ Dev \ ccnet \ tools \ nunit \ nunit-console.exe </ Path >
< Assemblies >
< Assembly > D: \ Dev \ refactoring \ bin \ debug \ refactoring.exe </ Assembly >
< Assembly > D: \ Dev \ refactoring \ bin \ debug \ refactoring. Core. dll </ Assembly >
</ Assemblies >
</ Nunit >
</ Tasks >
 
 
 
4. executable task
 
Execute oneProgram
Example 1: <exec executable = "C: \ projects \ myproject \ build. Bat"/>
 
Example 2:
< Exec >
< Executable > Make </ Executable >
< Basedirectory > D: \ Dev \ myproject </ Basedirectory >
< Buildargs > All </ Buildargs >
< Buildtimeoutseconds > 10 </ Buildtimeoutseconds >
</ Exec >
 
 

You can load any program you want to execute, such as fxcop.

5. Email publisher

Email Notification compilation report

< Email From = "Buildmaster@mycompany.com" Mailhost = "Smtp.mycompany.com"
Mailhostusername = "Smtpuser" Mailhostpassword = "Smtppassword" Includedetails = "True" >
< Users >
< User Name = "Buildguru" Group = "Buildmaster" Address = "Buildguru@mycompany.com" />
< User Name = "Joedeveloper" Group = "Developers" Address = "Joedeveloper@thoughtworks.com" />
</ Users >
< Groups >
< Group Name = "Developers" Notification = "Change" />
< Group Name = "Buildmaster" Notification = "Always" />
</ Groups >
</ Email >

 
Notification:
  • Always "-as long as compilation occurs
  • "Change"-the status of the compilation changes, from success to failure or failure to success.
  • "Failed"-compilation failed
  • "Success"-compiled successfully
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.