2014-01-22 56 views
0

我想取消再通過URL開始我的構建:我怎樣才能取消/通過請求URL阻止我構建

這我如何開始我的身材:

http://<user name>:<user password>@<server address>/httpAuth/action.html?add2Queue=<build type Id> 

,但是當我試圖取消/停止:

http://<user name>:<user password>@<server address>/ajax.html?comment=<cancel_comment>&submit=Stop&buildId=<internal_build_id>&kill 

我得到異常:

Error message: Given kill operation code is null 
TeamCity: 8.0.5 (build 27692) 
Operating system: Windows Server 2008 R2 (6.1, x86) 
Java: 1.7.0_21-b11 (Oracle Corporation) 
Servlet container: Apache Tomcat/7.0.37 

Trace: java.lang.IllegalArgumentException: Given kill operation code is null 

來源:Accessing server by HTTP

我試過REST API但沒有幫助我。

回答

1

我分析js代碼中的TeamCity,發現2溶液

  • 殺建立由進程ID:

yourTeamCityUrl/ajax.html註釋=%somment%&殺=%buildQueueId %& operationKind = 2 & _readd = & submit =停止

  • 殺建立由版本ID:

yourTeamCityUrl/ajax.html評論=%註釋%&提交=停止& buildId =%active_build%&殺& operationKind = 1

只需要添加& operationKind = 1