Sample CCNET nightly scheduled build

Hi

Recently I have developed nightly scheduled build for cruise control .net dashboard. Below is sample project where version polling will happen at 4 pm and if changes are there other then builduser account then build will be triggered. I have also created recently plugin to accommodate whether and ion what case build label should increase.

<cb:scope ProjectName=”Project Build” TargetName=”Main” SharedPath=”\\mymachine\sharedpath”>

<project name=”$(ProjectName)”

description=”This is for compiling and creating build of Project” showStartStopButton=”false” askForForceBuildReason=”required”>

<triggers>

<!–<scheduleTrigger time=”11:30″ buildCondition=”ForceBuild” name=”Nightly Scheduled”>–>

<scheduleTrigger time=”16:00″ buildCondition=”IfModificationExists” name=”Nightly Scheduled”>

<weekDays>

<weekDay>Monday</weekDay>

<weekDay>Tuesday</weekDay>

<weekDay>Wednesday</weekDay>

<weekDay>Thursday</weekDay>

<weekDay>Friday</weekDay>

<weekDay>Saturday</weekDay>

<weekDay>Sunday</weekDay>

</weekDays>

</scheduleTrigger>

</triggers>

<category>Nightly Scheduled Build</category>

<labeller type=”sharedLabeller”>

<sharedLabelFilePath>E:\Program Files\CruiseControl.NET\server\buildnumber.txt</sharedLabelFilePath>

<buildSuccessFile>E:\Program Files\CruiseControl.NET\server\buildSuccessFile.txt</buildSuccessFile>

<alwaysincrement>yes</alwaysincrement>

</labeller>

<sourcecontrol type=”filtered”>

<sourceControlProvider type=”vsts” autoGetSource=”false” applyLabel=”false”>

<server>http://tfs01:8080/tfs/projectoffice</server&gt;

<project>$/Project/Main</project>

<workingDirectory>E:\Project\Main</workingDirectory>

<cleanCopy>true</cleanCopy>

<workspace>mymachineworkingcopy</workspace>

<force>false</force>

<executable>C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe</executable>

<username>builduser</username>

<password>password</password>

</sourceControlProvider>

<exclusionFilters>

<userFilter>

<names>

<name>builduser</name>

</names>

</userFilter>

</exclusionFilters>

</sourcecontrol>

 

<tasks>

<modificationHistory onlyLogWhenChangesFound=”true” />

<modificationWriter>

<filename>Modifications.$(buildlabel).xml</filename>

<path>C:\Data</path>

<appendTimeStamp>False</appendTimeStamp>

</modificationWriter>

<nant>

<executable>C:\Program Files\NANT\bin\nant.exe</executable>

<baseDirectory>E:\saratoga\ga\Main\BuildScripts_CCNET</baseDirectory>

<buildArgs>-D:outputType=Xml -D:BuildType=”Full” -D:branchname=”Main”</buildArgs>

<nologo>false</nologo>

<buildFile>BuildMain.build</buildFile>

<targetList>

<target>$(TargetName)</target>

</targetList>

<buildTimeoutSeconds>200000</buildTimeoutSeconds>

</nant>

<modificationReader>

<deleteAfterRead>false</deleteAfterRead>

<filename>Modifications.$(buildlabel).xml</filename>

<path>C:\Data</path>

</modificationReader>

</tasks>

<publishers>

<xmllogger />

<artifactcleanup cleanUpMethod=”KeepLastXBuilds”

cleanUpValue=”50″ />

<email from=”mygroup@mydomain.com” mailhost=”serverhost.com” includeDetails=”TRUE”>

<users>

<user name=”Myteam” group=”myteam” address=”groupemail@mydomain.com”/>

</users>

<groups>

<group name=”Myteam”>

<notifications>

<notificationType>Always</notificationType>

</notifications>

</group>

 

</groups>

<subjectSettings>

<subject buildResult=”Success” value=”$(ProjectName) $(buildlabel) is available @ $(SharedPath)” />

<subject buildResult=”Fixed” value=”$(ProjectName) $(buildlabel) is now fixed and available @ $(SharedPath)” />

<subject buildResult=”StillBroken” value=”$(ProjectName) is still broken, the fix tried has failed.” />

<subject buildResult=”Broken” value=”$(ProjectName) broke for $(buildlabel). Refer buildlogs for complete log file to see exact reason”  />

<subject buildResult=”Exception” value=”Network / source control / System problem for $(ProjectName).” />

</subjectSettings>

<xslFiles>

<file>xsl\header.xsl</file>

<file>xsl\compile.xsl</file>

</xslFiles>

<attachments>

<file>C:\Data\KeyFile.txt</file>

<file>C:\Data\Modifications.$(buildlabel).txt</file>

</attachments>

</email>

</publishers>

</project>

</cb:scope>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s