You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by br...@apache.org on 2004/07/26 17:12:26 UTC
svn commit: rev 30719 - in forrest/trunk/src: documentation/content/xdocs/docs forrestbot/core
Author: brondsem
Date: Mon Jul 26 08:12:25 2004
New Revision: 30719
Modified:
forrest/trunk/src/documentation/content/xdocs/docs/forrestbot.xml
forrest/trunk/src/forrestbot/core/notify.xml
Log:
finer control over when notification happens
Modified: forrest/trunk/src/documentation/content/xdocs/docs/forrestbot.xml
==============================================================================
--- forrest/trunk/src/documentation/content/xdocs/docs/forrestbot.xml (original)
+++ forrest/trunk/src/documentation/content/xdocs/docs/forrestbot.xml Mon Jul 26 08:12:25 2004
@@ -74,9 +74,8 @@
</source>
<p>First, set properties needed by the workstages you are going to use.
- Here, we set properties that will be used by notify.email and
- getsrc.cvs. Next, specify what implementations will be used by each
- workstage.</p>
+ Here, we set properties that will be used by notify.email and getsrc.cvs.
+ Next, specify what implementations will be used by each workstage.</p>
<table>
<tr>
@@ -109,8 +108,7 @@
<td>deploy</td>
<td><ul>
- <li><link href="#deploy.local">deploy.local</link>
- (default)</li>
+ <li><link href="#deploy.local">deploy.local</link> (default)</li>
<li><link href="#deploy.scp">deploy.scp</link></li>
@@ -124,8 +122,7 @@
<td><link href="#notify">notify</link></td>
<td><ul>
- <li><link href="#notify.local">notify.local</link>
- (default)</li>
+ <li><link href="#notify.local">notify.local</link> (default)</li>
<li><link href="#notify.email">notify.email</link></li>
</ul></td>
@@ -140,9 +137,9 @@
<p></p>
- <p>Many workstages use usernames and passwords. You may want to keep
- them out of your project's xml file (especially if you store that file
- in CVS or SVN). A nice way to do this is make a simple buildfile (e.g.
+ <p>Many workstages use usernames and passwords. You may want to keep them
+ out of your project's xml file (especially if you store that file in CVS
+ or SVN). A nice way to do this is make a simple buildfile (e.g.
my-settings.xml) that just sets those properties (don't include it in
CVS/SVN!). Then in your project buildfile, have <code><import
file="my-settings.xml"/></code>.</p>
@@ -265,8 +262,8 @@
<tr>
<td>getsrc.cvs.module</td>
- <td>CVS module name (an alias, or full path) to the directory
- that contains forrest.properties</td>
+ <td>CVS module name (an alias, or full path) to the directory that
+ contains forrest.properties</td>
<td>${ant.project.name}</td>
@@ -388,9 +385,9 @@
<section id="deploy.local">
<title>deploy.scp</title>
- <p>${user.home}/.ssh/known_hosts must properly recognize the host,
- so you should manually make an ssh connection to the host if you
- never have before.</p>
+ <p>${user.home}/.ssh/known_hosts must properly recognize the host, so
+ you should manually make an ssh connection to the host if you never
+ have before.</p>
<table>
<tr>
@@ -589,6 +586,28 @@
</tr>
<tr>
+ <td>notify.on.failure</td>
+
+ <td>On a build failure, notification will happen if this is
+ true.</td>
+
+ <td>true</td>
+
+ <td>No</td>
+ </tr>
+
+ <tr>
+ <td>notify.on.success</td>
+
+ <td>On a succesful build, notification will happen if this is
+ true.</td>
+
+ <td>true</td>
+
+ <td>No</td>
+ </tr>
+
+ <tr>
<td>notify.log</td>
<td>Log file</td>
@@ -667,9 +686,9 @@
<section>
<title>Forrestbot design</title>
- <p>Forrest and forrestbot use ant buildfiles extensively. Ant 1.6's
- import task is used to import multiple buildfiles into a single build.
- The following is the flow of control when running forrestbot:</p>
+ <p>Forrest and forrestbot use ant buildfiles extensively. Ant 1.6's import
+ task is used to import multiple buildfiles into a single build. The
+ following is the flow of control when running forrestbot:</p>
<ul>
<li>Your buildfile<ul>
@@ -683,8 +702,8 @@
<p>The workstage buildfiles set up the properties and files so that the
main forrest buildfile (forrest.build.xml) will run. After it is run,
- other workstages buildfiles can implement reporting, deployment, or
- other post-build activities.</p>
+ other workstages buildfiles can implement reporting, deployment, or other
+ post-build activities.</p>
<p>Your buildfile can specify which workstages you want to use, set
properties for them, and do any additional pre- and post-processing.</p>
Modified: forrest/trunk/src/forrestbot/core/notify.xml
==============================================================================
--- forrest/trunk/src/forrestbot/core/notify.xml (original)
+++ forrest/trunk/src/forrestbot/core/notify.xml Mon Jul 26 08:12:25 2004
@@ -18,15 +18,36 @@
<!-- default values -->
<property name="notify.administrator" value=""/>
+ <property name="notify.on.failure" value="true"/>
+ <property name="notify.on.success" value="true"/>
<!-- set property defaults after other workstages have been run -->
<target name="notify.init">
<property name="notify.log" value="${build.logfile-stored}"/>
<property name="notify.deploy-location" value="- workstage should have set this -"/>
<property name="notify.completion-status" value="- workstage should have set this -"/>
+ <if>
+ <isset property="build.failed"/>
+ <then>
+ <if>
+ <istrue value="${notify.on.failure}"/>
+ <then>
+ <property name="notify.do" value="true"/>
+ </then>
+ </if>
+ </then>
+ <else>
+ <if>
+ <istrue value="${notify.on.success}"/>
+ <then>
+ <property name="notify.do" value="true"/>
+ </then>
+ </if>
+ </else>
+ </if>
</target>
- <target name="notify.local" depends="notify.init, build" description="FB: Notify to the console">
+ <target name="notify.local" depends="notify.init, build" if="notify.do" description="FB: Notify to the console">
<tstamp>
<format property="NOW" pattern="dd MMMM hh:mm aa"/>
</tstamp>
@@ -47,7 +68,7 @@
<property name="notify.email.host" value="localhost"/>
<property name="notify.email.to" value="${user.name}@localhost"/>
- <target name="notify.email" depends="notify.init, build" if="build.failed" description="FB: Notify by email">
+ <target name="notify.email" depends="notify.init, build" if="notify.do" description="FB: Notify by email">
<tstamp>
<format property="NOW" pattern="dd MMMM hh:mm aa"/>
</tstamp>