CCNET Config Conditional Task Execution

118 views
Skip to first unread message

Shashi Bhushan Singh

unread,
Oct 31, 2013, 7:22:40 AM10/31/13
to ccnet...@googlegroups.com

Hi all require help on CCNet Conditional execution.

These are the Triggers I have declared

 <intervalTrigger
           name="continuous"
           seconds="30"
           buildCondition="IfModificationExists"
           initialSeconds="5"/>

  <scheduleTrigger time="23:30" buildCondition="ForceBuild" name="scheduled">
    <weekDays>
      <weekDay>Monday</weekDay>
    </weekDays>
  </scheduleTrigger>
</triggers>
Below is the Task I am Having both to be triggered based on Condition
<conditional>
  <conditions>
    <compareCondition value1="$[buildCondition]"
      value2="IfModificationExists"  />
  </conditions>
    <tasks>
     <msbuild >
     <executable>...\v4.0.30319\MSBuild.exe</executable>
     <workingDirectory>...\WcfServiceLibrary1\</workingDirectory>
     <projectFile>MSBuild_MasterConfigFile.BUILD</projectFile>
     <buildArgs>/target:CCNETBUILD /p:Config=Debug</buildArgs>
     <timeout>900</timeout>
   </msbuild>

    <elseTasks>
      <msbuild ><executable>...\v4.0.30319\MSBuild.exe</executable>
      <workingDirectory>...\WcfServiceLibrary1\</workingDirectory>
      <projectFile>MSBuild_MasterConfigFile.BUILD</projectFile>
      <buildArgs>/target:CCNETDeploy /p:Config=Debug</buildArgs>
      <timeout>900</timeout>
    </msbuild>
  </elseTasks>
</conditional>
I am getting unused node detected exception. Please help me asap. Thanks in advance.

OBones

unread,
Oct 31, 2013, 9:49:26 AM10/31/13
to ccnet...@googlegroups.com
Hello,

Your XML is not even valid to start with, the tasks element is not closed...

Shashi Bhushan Singh

unread,
Nov 12, 2013, 2:49:58 AM11/12/13
to ccnet...@googlegroups.com
Really sorry for the Typo Error I am re-posting the current code below again

    <conditional>
       <conditions>
         <compareCondition value1=""
              value2="IfModificationExists"  />
         <dynamicValues>
           <directValue>
             <parameter>buildCondition</parameter>
             <property>compareCondition.value1</property>
           </directValue>
         </dynamicValues>
       </conditions>
    <tasks>
  
     <msbuild >
       <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
       <workingDirectory>D:\...\WcfServiceLibrary1</workingDirectory>
       <projectFile>MSBuild_MasterConfigFile.BUILD</projectFile>
       <buildArgs>/target:CCNETDeploy /p:Config=Debug</buildArgs>
       <timeout>900</timeout>
     </msbuild>

   </tasks>
        <elseTasks>
       <msbuild >
       <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
       <workingDirectory>D:\...\WcfServiceLibrary1</workingDirectory>
       <projectFile>MSBuild_MasterConfigFile.BUILD</projectFile>
       <buildArgs>/target:Package /p:Config=Debug</buildArgs>
       <timeout>900</timeout>
     </msbuild>
  </elseTasks>
   
    </conditional>

Was on Holiday so late in replying. Please let me know how to resolve this situation.
Thanks
Shashi

OBones

unread,
Nov 12, 2013, 9:29:29 AM11/12/13
to ccnet...@googlegroups.com
You are putting the dynamicValues inside the Conditions block, but please read the documentation, the conditions block does not have any dynamicvalues block authorized. It's meant to be placed inside the conditional task itself...
Reply all
Reply to author
Forward
0 new messages