Hi Andrew,
Unfortunately I am not able to answer your question, but after seeing
your code I have tried to implement some functionality using the
conidtional plugin and am having some difficulties making it work. I
am assuming the one you are using is from http://ccnetconditional.codeplex.com/.
I downloaded this and put it in the server folder and have the
following code in my project:
<!-- omitted for brevity -->
<conditional>
<conditions>
<compareCondition value1="$[ProjectType]" value2="copen"
evaluation="equal" ignoreCase="true"/>
<compareCondition value1="$[OperationType]" value2="compile"
evaluation="equal" ignoreCase="true"/>
</conditions>
<tasks>
<nant>
<executable>C:\Program Files\nant-0.85\bin\nant.exe</
executable>
<baseDirectory>C:\OAS</baseDirectory>
<buildFile>Oracle9i_Automation_v2.build</buildFile>
<targetList>
<target>build</target>
</targetList>
<buildArgs>xxx</buildArgs>
</nant>
</tasks>
<elsetasks/>
</conditional>
<parameters>
<selectParameter name="ProjectType">
<description>The type of project to operate on.</description>
<allowedValues>
<value name="COPEN">copen</value>
<value name="BCS">bcs</value>
<value name="FCDD">fcdd</value>
</allowedValues>
</selectParameter>
<selectParameter name="OperationType">
<description>The type of operation to do.</description>
<allowedValues>
<value name="Compile?">compile</value>
<value name="Compile and deploy?">compiledeploy</value>
</allowedValues>
</selectParameter>
</parameters>
<!-- omitted for brevity -->
However, when I try to start the CCNet server, it crashes with the
following error:
[1:ERROR] INTERNAL ERROR: Unable to load types from assembly
CCNet.Conditional.Plugin, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null:
Failed to load 1 of the 17 types defined in the assembly.
Exceptions:
- Unable to load type: CCNet.Conditional.Plugin.GeneralTaskResult
Exception: System.TypeLoadException: Method 'CheckIfSuccess'
in type 'CCNet.Conditional.Plugin.GeneralTaskResult' from assembly
'CCNet.Conditional.Plugin, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' does not have an implementation.
----------
Exortech.NetReflector.NetReflectorTypeLoadException: Unable to load
types from assembly CCNet.Conditional.Plugin, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null:Failed to load 1 of the 17 types
defined in the assembly.
Exceptions:
- Unable to load type: CCNet.Conditional.Plugin.GeneralTaskResult
Exception: System.TypeLoadException: Method 'CheckIfSuccess'
in type 'CCNet.Conditional.Plugin.GeneralTaskResult' from assembly
'CCNet.Conditional.Plugin, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' does not have an implementation.
at Exortech.NetReflector.NetReflectorTypeTable.GetTypes(Assembly
assembly)
at Exortech.NetReflector.NetReflectorTypeTable.Add(Assembly
assembly)
at Exortech.NetReflector.NetReflectorTypeTable.Add(String
assemblyFilename)
at Exortech.NetReflector.NetReflectorTypeTable.Add(String path,
String searchPattern)
at
ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader..ctor()
at
ThoughtWorks.CruiseControl.Core.CruiseServerFactory.NewConfigurationService(String
configFile)
at
ThoughtWorks.CruiseControl.Core.CruiseServerFactory.CreateLocal(String
configFile)
at
ThoughtWorks.CruiseControl.Core.CruiseServerFactory.CreateRemote(String
configFile)
at
ThoughtWorks.CruiseControl.Core.CruiseServerFactory.Create(Boolean
remote, String configFile)
at ThoughtWorks.CruiseControl.Core.ConsoleRunner.LaunchServer()
at ThoughtWorks.CruiseControl.Core.ConsoleRunner.Run()
at ThoughtWorks.CruiseControl.Console.AppRunner.Run(String[] args,
Boolean usesShadowCopying)
----------
Do you have any ideas on how to fix this issue? Thanks in advance!
On Apr 28, 5:01 am, Andrew Hayes <[email protected]> wrote:
> I'm still struggling with this; any clues anyone could suggest would be very
> helpful...
>
> Thanks
> Andrew
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On
> Behalf Of andrew
> Sent: Friday, April 16, 2010 9:12 AM
> To: ccnet-user
> Subject: [ccnet-user] Using named values in condition blocks
>
> We are running two basic types of builds: Normal and Nightly "Big"
> builds. Normal builds on changes to the depot; and doesn't build some
> of the really big projects we have. Nightly builds everything; and so
> we restrict that to run once a day; starting at 1am.
>
> Our trigger has this block:
> <parameterTrigger>
> <trigger type="scheduleTrigger" time="01:00"
> buildCondition="ForceBuild" name="Nightly post-scorch build" />
> <parameters>
> <namedValue name="isNightlyBuild" value="yes"/
>
> </parameters>
> </parameterTrigger>
>
> We also want users, when forcing a build, to have the option of
> running a nightly build as well; so we are using parameters for that.
> Our project definition has this block:
>
> <parameters>
> <selectParameter>
> <name>isNightlyBuild</name>
> <allowedValues>
> <value name="Nightly Big-Build">yes</value>
> <value name="Normal Build">no</value>
> </allowedValues>
> <display>Nightly BIG Build?</display>
> <description>removed for brevity...</description>
> <default>Normal Build</default>
> <required>false</required>
> </selectParameter>
> </parameters>
>
> To scope what is/is not built we installed the Conditional plugin.
>
> To test what is happening we added this line to the top of our tasks
> block:
> <!-- Output the build type to the log -->
> <conditional description="Log state of isNightlyBuild
> flag">
> <conditions>
> <compareCondition value1="$[isNightlyBuild]"
> value2="yes" evaluation="equal" ignoreCase="true"/>
> </conditions>
> <tasks>
> <commentTask message="isNightlybuild is true"/
>
> </tasks>
> <elseTasks>
> <commentTask message="isNightlybuild is false"/
>
> </elseTasks>
> </conditional>
>
> The problem is that if you start the build with a force, and set
> isNightlyBuild to Yes; it works (logs as you would expect); but the
> NIGHTLY trigger at 1am does not seem to set this flag correctly.
>
> Any suggestions?
>
> Thanks
> Andrew
>
> --
> Subscription
> settings:http://groups.google.com/group/ccnet-user/subscribe?hl=en
>
>
>
> smime.p7s
> 4KViewDownload- Hide quoted text -
>
> - Show quoted text -