CruiseControl.NET email publisher problem

后端 未结 3 559
天命终不由人
天命终不由人 2021-01-03 01:13

I want to set up ccnet to:

  1. Send mail to committers after each build (regardless of the status)
  2. Send mail to all other developers when the build break
相关标签:
3条回答
  • 2021-01-03 01:36

    I think this does what you want... we're running version 1.4.3 so YMMV. Devs get emails only when there is a change in fixed/failed status, while the PM gets an email every time there's a build.

    <groups>
       <group name="Always">
            <name>Always</name>
            <notification>Always</notification>
        </group>
        <group name="developers">
            <name>developers</name>
            <notification>Change</notification>
        </group>
    </groups>
    <users>
        <user name="dev1">
            <address>...</address>
            <group>developers</group>
            <name>...</name>
        </user>
        <user name="pm1">
            <address>...</address>
            <group>Always</group>
            <name>...</name>
        </user>
        <user name="dev2">
            <address>...</address>
            <group>developers</group>
            <name>...</name>
        </user>
        <user name="dev3">
            <address>...</address>
            <group>developers</group>
            <name>...</name>
        </user>
    </users>
    
    0 讨论(0)
  • 2021-01-03 01:38
    <email from="CruiseControlBuild@xxxxxxxx.com" mailhost="xxxxxxxx.com" includeDetails="True">
                <users>
                    <user name="Dev Staff" group="group1" address="xxxxxxxxxxx"/>
                    <user name="QA Staff" group="group1" address="xxxxxxxxxxx"/>
                </users>
                <groups>
                    <group name="group1" notification="always"/>
                </groups>
                <modifierNotificationTypes>
                    <NotificationType>Always</NotificationType>
                </modifierNotificationTypes>
            </email>
    

    This works, but be careful. Sending every developer an email for every build in a continuous system is begging to have your emails ignored. The only email I send to everyone is the nightly installer build.

    0 讨论(0)
  • 2021-01-03 01:42

    I believe that this does what you want (admittedly, a year after your question).

    NB: We use SVN, with a <svn> block. In CC.NET 1.4.xx, <email> blocks support regular expressions to work out email addresses from SVN usernames. It should work with other source control blocks, but I haven't used anything but SVN.

    We have something like the following in our <publishers> block (I've modified it to match your spec):

    <email ... includeDetails="true">
      <!-- Developers get an email whenever the build status changes -->
      <users>
        <user name="Dev1" group="developer" address="dev1@ourcompany.com" />
        <user name="Dev2" group="developer" address="dev2@ourcompany.com" />
      </users>
      <groups>
        <group name="developer" notification="change" />
      </groups>
    
      <!-- Committers get an email for every build they commit code for -->
      <converters>
        <regexConverter find="$" replace="@ourcompany.com" />
      </converters>
      <modifierNotificationTypes>
        <NotificationType>always</NotificationType>
      </modifierNotificationTypes>
    </email>
    

    So, dev1@ourcompany.com and dev2@ourcompany.com will get an email whenever the build status changes, and [svnuser]@ourcompany.com will get an email when the build they've committed code for finishes building.

    NB: if the build fails, svn users who have committed code since it last succeeded will continue to get further emails each time a build finishes until the build is fixed.

    0 讨论(0)
提交回复
热议问题