用户工具

站点工具


hudson

Hudson 笔记

Plugins

Timestamper

Email-ext

Instant messaging

Jabber

Locale

笔记

CVS

  • Update 命令行:cvs update -P -d
  • WinCVS 命令行:cvs -d :pserver:user:password@host:module update -P -d

SVN

Klocwork

  1. 进入到要进行分析的工程所在目录
  2. 创建分析:kwcheck.exe create license.host=192.168.0.1 license.port=1234
  3. 记录编译所需步骤到 tpl 文件:kwinject.exe -o output.tpl MSBuild.exe solution.sln /p:Configuration=Release /t:project
  4. 根据 tpl 进行分析生成 report:kwcheck.exe run -b output.tpl –report report.txt

Remote access API

/

  • Job list: http:/(Hudson_address)/api/xml
  • Quiet down: http:/(Hudson_address)/quietDown
  • Cancel quiet down: http:/(Hudson_address)/cancelQuietDown
  • Restart(POST): http:/(Hudson_address)/restart
  • Restart when no job is running: http:/(Hudson_address)/safeRestart

/queue

/job/(job_name)/

  • Build list: http:/(Hudson_address)/job/(job_name)/api/xml
  • Get job configuration: http:/(Hudson_address)/job/(job_name)/config.xml
  • Modify job configuration(POST): http:/(Hudson_address)/job/(job_name)/config.xml
  • Get job description: http:/(Hudson_address)/job/(job_name)/description
  • Modify job description(POST, description=(description)): http:/(Hudson_address)/job/(job_name)/description
  • Perform a build: http:/(Hudson_address)/job/(job_name)/build[?token=(token)][&delay=0sec]
  • Perform a build with parameters: http:/(Hudson_address)/job/(job_name)/buildWithParameters[?token=(token)][&key=value]
  • Disable job: http:/(Hudson_address)/job/(job_name)/disable
  • Enable job: http:/(Hudson_address)/job/(job_name)/enable
  • Delete job(POST): http:/(Hudson_address)/job/(job_name)/doDelete

/job/(job_name)/(build_number)/

  • Build information: http:/(Hudson_address)/job/(job_name)/(build_number)/api/xml
  • Get last build number: http:/(Hudson_address)/job/(job_name)/(build_number)/buildNumber
  • Get last build timestamp: http:/(Hudson_address)/job/(job_name)/(build_number)/buildTimestamp[?format=yyyy/MM/dd]
  • Abort the build (undocumented, must user/password?): http:/(Hudson_address)/job/(job_name)/(build_number)/stop

/job/(job_name)/lastBuild/

  • 同上

/job/(job_name)/lastSuccessfulBuild/

  • 同上

/job/(job_name)/lastFailedBuild/

  • 同上

/computer/api/xml

返回一个 computerSet 列表,列出了有效的节点的 information,还有 total 和 busy 的 executor 数等。

/computer/((computer_name))/api/xml

某个节点的详细信息。

/computer/((computer_name))/executors/(executor_number)/api/xml

正在做 building 的 executor 的信息,比如正在运行的 job 的 job_name、build_number 等。

Build result

目前所知的有 ABORTED,SUCCESS 和 FAILURE。

Build log

http:/(Hudson_address)/job/(job_name)/(build_number)/consoleText

HTTP BASIC authentication

如果 request 时没有带用户名密码的话,Hudson 会直接返回 403 Forbidden。如果 request 时带了错误的用户名密码的话,Hudson 会返回 401 Authorization Required,试图进行认证。因此要直接在请求的时候就带上用户名密码,一次搞定:

request = urllib2.Request( 'http://localhost:8080/job/test/3/stop' )
request.add_header( 'Authorization', 'Basic ' + base64.b64encode( 'username:password' ) )
f = urllib2.urlopen( request )
print f.read()
f.close()

这个用户只要有 build 权限就既可以 perform build 又可以 abort build。

hudson.txt · 最后更改: 2011/01/24 15:31 由 2ndboy