我想取消然后通过网址启动我的构建:
这是我开始构建的方式:
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
我试过了REST API,但没有帮助我。
答案 0 :(得分:1)
我在TeamCity中分析了js代码并找到了2个解决方案
yourTeamCityUrl / ajax.html注释=%somment%安培;杀=%buildQueueId%安培; operationKind = 2及_readd =安培;提交=停止
yourTeamCityUrl / ajax.html注释=%评论%安培;提交=停止&安培; buildId =%active_build%安培;杀&安培; operationKind = 1
只需要添加&amp; operationKind = 1