2013-08-05 39 views
0

構建完成後,我使用mail-ext-plugin(Jenkins電子郵件擴展插件)向某些用戶發送電子郵件。我想包括在該電子郵件中啓動(請求)構建的用戶。我試過here的建議,但似乎沒有工作我剛剛得到這個錯誤。在jenkins groovy電子郵件中包含構建請求用戶

Error in script or template: groovy.lang.MissingPropertyException: No such property: CAUSE for class: SimpleTemplateScript4 

回答

1

經過大量搜索,我在Jenkins wiki上找到了一個關於果凍用法的頁面(here)。此頁面上有一個link,其中包含所有可用的類。我能夠找到原因類,並使用這個偉大的example來幫助我在我的代碼中實現它。我加入

<% 
    for (hudson.model.Cause cause : build.causes) { 
%> 
     ${cause.shortDescription} 
<% 
    } 
%> 

它生產 -

Started by user Matthew Armstrong 
相關問題