I am interested in gathering every change that the Buildbot receive.

Ideally I need what is displayed in the web page for a commit:

Category
Changed by
Changed at
Repository
Branch  
Revision
Comments
Changed files

How do I access these field from either the cfg file or a custom class? I would like to have them all saved either in a text file or in a dictionary, sequentially; every time that the Buildbot receive a change that trigger a build; but I have no idea how to access them.

有帮助吗?

解决方案

Have a look at Source Stamp Properties There in changes you have access to these attributes.

So in a custom buildStep you could do something like:

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top