2009-06-23 101 views
5

我想CCNET設置爲:CruiseControl.NET電子郵件出版商問題

  1. 將郵件發送到提交者每個版本後(無論地位)
  2. 將郵件發送到所有其他開發者,當生成中斷或固定

隨着CCNET的每一個新版本的電子郵件出版商被重構的(而且據稱改善),但我仍然有同樣的問題:只有提交者得到通知 - 如果生成中斷,其他開發商不收到電子郵件。所以要麼我沒有得到這個系統,要麼在電子郵件發佈者中有一個長期未定義的錯誤。

我正在使用v1.4.4.83。我的示例配置(我刪除了不相關的東西):

<email 
    includeDetails="true"> 
    <users> 
     <user name="user1" address="[email protected]" group="developers" /> 
     <user name="user2" address="[email protected]" group="developers" /> 
    </users> 
    <groups> 
      <group name="developers"> 
       <notifications> 
        <notificationType>Failed</notificationType> 
        <notificationType>Fixed</notificationType> 
       </notifications> 
      </group> 
    </groups> 
    <modifierNotificationTypes> 
     <NotificationType>Always</NotificationType> 
    </modifierNotificationTypes> 
</email>    
+0

這看起來像一個功能之前沒有人需要,請你張貼到http://jira.public.thoughtworks.org/browse/CCNET? – skolima 2009-06-24 08:25:38

+0

有趣的是 - 這在CCNet以前的版本中實際上是可能的(我記得1.3)。 – 2009-06-24 09:42:23

回答

3

我相信這是做你想做的事(不出所料,在你提問後一年)。

注意:我們使用SVN和<svn>塊。在CC.NET 1.4.xx中,<email>塊支持正則表達式來處理來自SVN用戶名的電子郵件地址。它應該與其他源代碼控制塊一起工作,但我沒有使用任何東西,但SVN。

我們有一些像我們<publishers>塊以下的(我已經修改了它以符合您的規格):

<email ... includeDetails="true"> 
    <!-- Developers get an email whenever the build status changes --> 
    <users> 
    <user name="Dev1" group="developer" address="[email protected]" /> 
    <user name="Dev2" group="developer" address="[email protected]" /> 
    </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> 

所以,[email protected][email protected]將收到一封電子郵件每當構建狀態發生變化時,[svnuser] @ ourcompany.com將在他們提交的構建代碼完成構建時收到一封電子郵件。

注意:如果構建失敗,那麼自上次成功以來提交代碼的svn用戶每次構建完成後都會繼續收到更多電子郵件,直到構建得到修復。

0
<email from="[email protected]" 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> 

這工作,但要小心。向每個開發者發送一封電子郵件,以便在連續的系統中進行每一次構建,都要求您忽略電子郵件。我發送給每個人的唯一電子郵件是夜間安裝程序構建。

+1

亞歷克斯,我不想爲每個開發者發送一封電子郵件給每一個構建。我想我在問題開始時已經明確表達了(見1和2)。 – 2009-06-23 18:05:45

1

我認爲這是做你想做的......我們正在運行版本1.4.3所以YMMV。 Devs只有在固定/失敗狀態發生變化時纔會收到電子郵件,而PM在每次構建時都會收到一封電子郵件。

<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>