詹金斯:如何保存更改日志以进行构建 [英] Jenkins: how to save changelog for build

查看:30
本文介绍了詹金斯:如何保存更改日志以进行构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 SVN 下有 Jenkins-CI 和 C++ 项目.如何将成功构建之间的更改日志保存到文本(或 html)文件中?Jenkins 是否有任何变量/临时文件的内容为 .../changes 页面?

I have Jenkins-CI and C++ project under SVN. How to save changelog between successfull builds into text (or html) file ? Does Jenkins have any variable/temp file with content of .../changes page?

推荐答案

这里是 XPath 代码,可以通过 Jenkins API 获取给定构建 id 的变更集:

Here is XPath code that can get you the changeset for a given build id via Jenkins API:

http://[jenkins_host]/api/xml?depth=2&xpath=//build/id[text()='${BUILD_ID}']/../changeSet

(用实际的构建 ID 代替 ${BUILD_ID}).这可以由收集变更集的脚本(例如,利用 Python Jenkins 的 Pyhon 脚本)使用导致每次构建结束并将它们存储在临时位置.成功构建后,脚本可以收集自上次构建以来存储的所有结果并进行处理.

(Put actual build id instead of ${BUILD_ID}). This can be used by a script (say, a Pyhon script utilizing Python Jenkins) that collects changeset results in the end of every build and stores them in a temp locations. After a successful build the script can collect all results stored since the previous build and process them.

这篇关于詹金斯:如何保存更改日志以进行构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆