Skip to content

How to get a list of changed files to use in a dynamic trigger? #6884

Answered by ivanov17
ivanov17 asked this question in Q&A
Discussion options

You must be logged in to vote

Since I'm now using the DATA API to get all changes for current build, my dynamic trigger now looks like this:

class DynamicTrigger(steps.Trigger):
    '''Implements custom trigger step which add virtial builders and tags'''

    @defer.inlineCallbacks
    def run(self):
        '''If the jobs property is not set, sets it from the list of changed
        directories, and then calls the same function of the parent class'''

        changes = yield self.master.data.get(
            ('builds', str(self.build.buildid), 'changes'))
        properties = self.build.getProperties()
        if 'jobs' not in properties or not properties.getProperty('jobs'):
            directories = set()
            

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ivanov17
Comment options

@ivanov17
Comment options

Answer selected by ivanov17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant