Question

To be sure if project is compiling "from scratch" we have nightly builds. Usually these builds are successful, so, mails about them are not very useful.

Also there is usual builds, which run after someone commit code into version control. As these emails contain commit message and changed files list, they are useful even for successful builds.

How can I filter out successful nightly emails while still send all usual? Preferably by CruiseControl.Net means.

Here is part of CruiseControl.Net ccnet.config configuration file:

<intervalTrigger name="FrequentPoll" buildCondition="IfModificationExists"  seconds="60"/>
<scheduleTrigger name="Daily" buildCondition="ForceBuild" time="$(DailyBuildStartTime)"/>

Possible clue - in <exec> nodes program executed can determine which trigger started build by checking environment variable CCNetRequestSource.

However, even if, say, CCNetRequestSource was available in <email> node, yet I found no way <email> node may use it.

Can someone help me?

UPDATE: Found related question - CruiseControl.net Email

Était-ce utile?

La solution

You can wrap your email publisher with a conditional task (available since version 1.6), like so:

    <conditional>
      <conditions>
        <compareCondition>
          <value1>$[$CCNetRequestSource]</value1>
          <value2>FrequentPoll</value2>
          <evaluation>Equal</evaluation>
        </compareCondition>
      </conditions>

      <tasks>
        <email ... />
      </tasks>

    </conditional>

Pay attention to $[$CC] syntax when referencing built-in variables.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top