[Buildbot-devel] P4 change source, p4 checkout and p4 streams

Francesco Di Mizio francescodimizio at gmail.com
Wed Feb 4 18:24:36 UTC 2015


Hello guys,



I am going to ask a question and bring up something that might be worth
looking into.



Part 1)



I am using a P4Source poller and a SingleBranchScheduler to kick off some
builders that will then do a P4 checkout.



P4 structure looks like:



//project

//project/main

//project/Rel1.2

//project/Rel1.1



Project is a P4 stream.



The juicy parts of the P4Source poller are:



-       p4base='//project/'

-       split_file=lambda branchfile: branchfile.split('/',1)





As for the SingleBranchScheduler:



-       change_filter=util.ChangeFilter(branch=['main', 'Rel1.1',
'Rel1.2']),

-       treeStableTimer=None,

-       builderNames=["mybuilder"]))



This causes the builder to be kicked off the right way. The Branch property
is populated the right way, assuming values such as main and 1.2. Even the
changes portion on the web UI is being populated in accordance to what is
going on in P4.



Now the part I don’t get: when I now perform a p4 checkout (using
p4base='//project/' in the p4-step definition) the Branch property’s value
isn’t considered. The sync command turns out to be ‘sync //project/… ’
instead of ‘’sync //project/Rel1.1/…’



I could of course as well run my own p4 commands but then I’d lose the
got_revision thingy set by the standard P4 checkout. Not sure if setting
got_revision myself would have the same results.





Part 2 – P4 Streams



Well P4 introduced a while ago this new concept. They involve the creation
of a specific type of p4 clients, all of which is missing from the current
P4 checkout implementation. Is there anything planned about this? I might
consider working myself into this if you think it’s worth it.



Cheers,

 Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20150204/453b8a44/attachment.html>


More information about the devel mailing list