我有兴趣收集Buildbot收到的所有更改。
理想情况下,我需要提交网页中显示的内容:
Category
Changed by
Changed at
Repository
Branch
Revision
Comments
Changed files
如何从cfg文件或自定义类访问这些字段?我希望将它们全部保存在文本文件或字典中,顺序排列;每次Buildbot收到触发构建的更改;但我不知道如何访问它们。
答案 0 :(得分:0)
看看Source Stamp Properties 如有更改,您可以访问these属性。
因此,在自定义buildStep中,您可以执行以下操作:
def start(self):
branch = self.getProperty('branch')
revision = self.getProperty('revision')
repository = self.getProperty('repository')
changes = self.getProperty("changes") or [] # returns None if there are no changes
for ch in changes:
changed_by = ch.who
changed_at = ch.when
comments = ch.comments
changed_files = ch.files
#save to file in master
#call super start