[users at bb.net] Skipping a build based on file patterns

Chris Spencer chrisspen at gmail.com
Mon Sep 24 17:10:01 UTC 2018


Thanks, that's what I was looking for.

On Mon, Sep 24, 2018 at 11:12 AM, Pierre Tardy <tardyp at gmail.com> wrote:

> There is a callback (fileIsImportant) in schedulers for that.
> http://docs.buildbot.net/latest/manual/cfg-schedulers.
> html?highlight=fileisimportant
>
> For diff between fileIsImportant and changeFilter:
>
> fileIsImportantA callable which takes one argument, a Change instance,
> and returns True if the change is worth building, and False if it is not.
> Unimportant Changes are accumulated until the build is triggered by an
> important change. The default value of None means that all Changes are
> important.change_filterThe change filter that will determine which
> changes are recognized by this scheduler; Change Filters
> <http://docs.buildbot.net/latest/manual/cfg-schedulers.html?highlight=fileisimportant#change-filters>.
> Note that this is different from fileIsImportant: if the change filter
> filters out a Change, then it is completely ignored by the scheduler. If a
> Change is allowed by the change filter, but is deemed unimportant, then it
> will not cause builds to start, but will be remembered and shown in status
> displays.
>
> On Mon, Sep 24, 2018 at 5:05 PM Chris Spencer <chrisspen at gmail.com> wrote:
>
>> What's the best way to skip a build if the change doesn't include certain
>> files?
>>
>> I'd like Buildbot to only run a build if certain files are changed (e.g.
>> *.py, *.js, *.css, *.html, *.sql). I don't want a build to run if only
>> documentation or README files have changed.
>>
>> I think this is what the ChangeFilter (http://docs.buildbot.net/0.8.
>> 0/Change-Filters.html) is used for but the specified fields only seem to
>> let you filter based on folder names, not file extensions.
>>
>> If this isn't practical to do with a ChangeFilter, is there a way to
>> design a build step to pass the build while skipping all other steps? I
>> have a bash script that uses git/grep/awk to do this check, and return a
>> boolean if any key files have changed.
>> _______________________________________________
>> users mailing list
>> users at buildbot.net
>> https://lists.buildbot.net/mailman/listinfo/users
>
> --
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20180924/e6ff1b07/attachment.html>


More information about the users mailing list