[Anthill-pro] Notification scheme best practices

emerson cargnin echofloripa.yell at gmail.com
Thu May 29 11:10:36 CDT 2008


Hi Guys

I'm sending this to try to collect some best practices to use with
anthill. I honestly think the default schemas are not sufficient.

* Building notifications:

- CI and build from a tag- Each CI workflow (or one if you don't have
ci for branches) uses a CI notifications scheme. I configured it to
send to all users, and I added a case selector called "change status
selector" that checks if status changed for that workflow. So if it
has success always it won't send an email, only when it fails, and
then will only send again when it is fixed. This is the configuration
that I used to use in cruisecontrol. Good idea to have it
out-of-the-box:

import com.urbancode.anthill3.domain.workflow.*;

import com.urbancode.anthill3.dashboard.*;

boolean result = false;

if (event instanceof WorkflowEvent && event.getCase().isComplete()) {
    Long wid = event.getCase().getWorkflow().getId();
    BuildLifeWorkflowCaseSummary[]  blwcs=DashboardFactory.getInstance().
    getBuildLifeWorkflowSummariesByWorkflow(wid,null, new Integer(2));
    if(blwcs.length == 2){
        if(!blwcs[0].getStatus().equals(blwcs[1].getStatus())){
            result=true;
        }
    }
}

return result;

- Pure Trunk builds: I use a sendOnAFailure notification schema, which
uses the workflow fails workflow selector.


* Deployment Notifications:

-  use a sendOnAFailure notification schema, which uses the workflow
fails workflow selector.

I think in adding other user selectors as well, as creating a role for
who wants to be notified of any deployment or build, or sending
message always to the committer.


It would be great to know what approach other people are using when
setting notifications.

By the way, the UserLookup.getAllContributers(workflow); return all
users that committed since the last build???

Templates:

I think the email template (changelog) that comes with anthill is a
bit messy and doens't show relevant information. I changed it slightly
to show the project and skip empty jobs. Have some one created some
interesting templates? Like for example not showing all steps with
success, or having only a summary of the build with any failed
steps...

thanks
emerson


Thank you
Emerson


More information about the Anthill-pro mailing list