[users at bb.net] buildbot poller question

Mojca Miklavec mojca at macports.org
Tue Jul 23 12:35:52 UTC 2019


Hi,

Disclaimer: I'm not an expert in the field.

On Mon, 22 Jul 2019 at 21:15, Ken Dalka wrote:
>
> Instead of polling a repository for a change, is there a way to poll a directory?
>
> On a Linux machine, I’d like to check a directory to see if any new files show up and schedule a build when they do.

I don't have the answer at hand, but I'm doing builds for a project
(from which I sync the sources via rsync) several times per day, just
because I was too lazy to write some mechanism in the background, and
doing builds a couple of times per day seemed like a viable temporary
workaround. (I used this because the author didn't want his sources to
be made public just yet, and using a private repository on GitHub/Lab
would also require figuring a safe way to distribute access keys to
that repository etc., while rsync was already only available in the
private network where workers are located, and it offered a quick was
to set everything up.)

I was thinking about whether it would make sense to write
"RsyncPoller". It might not be that hard: with a proper rsync call it
might be easy enough to figure out if files have changed (even though
in my case I don't have access to the rsync sources directly from the
master, only from the builders, so it wouldn't be of immediate help
without some further modifications), except that the author field
would then be empty.

(I kept contemplating whether mentioning this loud would make sense or not.)

As an intermediate workaround (other than doing checksums as suggested
by Glen, which would be my first thought as well) it should probably
be viable to copy the contents of the folder somewhere on the master,
run "git add -A && git commit" on regular basis, and check whether
that repository changed.

Mojca


More information about the users mailing list