Here’s the code: https://dpaste.de/25Ya

This was written for a Buildbot master running on Windows, monitoring a Windows 
share that was a poor excuse for a source control system on one, fleeting 
project.

If you’re mounting the Windows share to linux (I assume via smbmount or some 
Samba component, then the code could actually be a lot simpler.

A windows “dir /s /a <drive letter:” command’s output includes the drive letter 
and the free space info, which would be both different and irrelevant, so this 
module included code to normalize/cut that portion of the output before 
comparing an SSA256 signature for changes.

A linux implementation shouldn’t need anything like that.  The “ls -lRa 
/monitored/directory” output shouldn’t require any sort of normalization.

That dpaste.de URL will only be available for 7 days, so save the text.

Enjoy,
-G

”””
Glen R. J. Neff      .:|:.:|:.
   Network Consulting Engineer IV
   Cisco: Advanced Services, Advanced Delivery Network
   gn...@cisco.com
”””

From: Ken Dalka <k...@whleary.com>
Sent: Tuesday, July 23, 2019 16:11
To: Glen Neff (gneff) <gn...@cisco.com>
Subject: RE: buildbot poller question

Yes, please, I would like to get a copy of your change poller. I’ve been trying 
to read the docs on writing a change poller, but I haven’t found much info.

The directory I am monitoring is actually on a windows file share, but I’m not 
sure how that would make a difference.
The other automated build system is on a windows machine and I need to provide 
some windows and Linux executables in the same package. The windows executable 
runs under Wine on Linux.

Thanks!



Ken Dalka
Staff Software Engineer
W. H. Leary Co.
P. +1 708.444.4900
E. k...@whleary.com<mailto:k...@whleary.com> | W. 
whleary.com<http://www.whleary.com>


From: users [mailto:users-boun...@buildbot.net] On Behalf Of Glen Neff (gneff)
Sent: Tuesday, July 23, 2019 7:08 AM
To: users@buildbot.net<mailto:users@buildbot.net>
Subject: [External] Re: [us...@bb.net] buildbot poller question

I once had to write a change poller plugin for a similar scenario, only it was 
monitoring a Windows file share, but I believe a similar method could work.  I 
stored a SHA256 sum of a recursive directory listing for the file tree in 
question, and the plugin would grab the same listing, and compare the SHA256 
sums as the change trigger.

I could share the code if asked nicely.

-G

”””
Glen R. J. Neff      .:|:.:|:.
   Network Consulting Engineer IV
   Cisco: Advanced Services, Advanced Delivery Network
   gn...@cisco.com<mailto:gn...@cisco.com>
”””

From: users <users-boun...@buildbot.net<mailto:users-boun...@buildbot.net>> On 
Behalf Of Ken Dalka
Sent: Monday, July 22, 2019 15:15
To: users@buildbot.net<mailto:users@buildbot.net>
Subject: [us...@bb.net] buildbot poller question

I’m not sure if this is the right place to ask a question, but I couldn’t find 
another forum for this.
If this is the wrong place, let me know.


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.
Unfortunately, I have another automated build system that isn’t using buildbot 
and I’d like buildbot to do a build whenever the other system finishes a build.



Ken Dalka
Staff Software Engineer
W. H. Leary Company
8440 183rd Place Tinley Park, IL 60487 USA
P. +1 708.444.4900
w. whleary.com<http://www.whleary.com>

[cid:image001.png@01D54210.08AF6500]<https://www.whleary.com/sempre-i-cold-glue-application>
_______________________________________________
users mailing list
users@buildbot.net
https://lists.buildbot.net/mailman/listinfo/users

Reply via email to