Autobuilder: fix SingleBranchScheduler to look at any repo
PATCH 1/2 Autobuilder: fix SingleBranchScheduler to look at any repo
From: California Sullivan <[email protected]>
Previously, it could only look at the repo at the zero index, which was usually poky. If the scheduler's 'repository' field did not match this, the scheduler would immediately exit without being added. This change makes it looks through all listed repos for a match.
--- lib/python2.7/site-packages/autobuilder/Autobuilder.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
lib/python2.7/site-packages/autobuilder/Autobuilder.py +10 -2
@@ -202,8 +202,16 @@ class Autobuilder: continue reponame = value['repository'] - repos = dict(ast.literal_eval(self.configdict[key]['repos'])[0]) - if not repos.has_key(reponame): + repos=None + repo=None + + for x in ast.literal_eval(self.configdict[key]['repos']): + if dict(x).has_key(reponame): + repos=x + repo=repos[reponame] + break + + if repo is None: log.msg("No repo %s found" % reponame) continue
Signature · 1 line
1.9.3
PATCH 2/2 Autobuilder: add GitPoller ChangeSource for SingleBranchScheduler
From: California Sullivan <[email protected]>
Previously, PBChangeSource was the only option for changesources. PBChangeSource was not always suitable since the remote repository had to be able to run custom hooks, which isn't always available. This commit adds GitPoller as an option.
--- lib/python2.7/site-packages/autobuilder/Autobuilder.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
lib/python2.7/site-packages/autobuilder/Autobuilder.py +14 -2
@@ -230,14 +230,26 @@ class Autobuilder: if value.has_key('change-password'): passwd=value['change-password'] - self.yocto_sources.append(PBChangeSource(user=user, passwd=passwd)) - branch="master" stabletimer=60 if repo.has_key('branch'): branch = repo['branch'] if value.has_key('stable-timer'): stabletimer = value['stable-timer'] + + if value.has_key('changesource') and value['changesource'] == 'GitPoller': + if value.has_key('interval'): + interval = int(value['interval']) + else: + # default to 5 minutes poll intervals + interval = 60*5 + self.yocto_sources.append(GitPoller(repourl=repo['repourl'], branch=branch, pollInterval=interval)) + log.msg("Adding GitPoller as changesource for " + reponame) + else: + # default to use PBChangeSource as the changesource + self.yocto_sources.append(PBChangeSource(user=user, passwd=passwd)) + log.msg("Adding PBChangeSource as changesource for " + reponame) + self.yocto_sched.append(SingleBranchScheduler(name=str(name), builderNames=['%s' % key], properties=checkoutprops,
Signature · 1 line
1.9.3
Re: [Yocto Autobuilder][PATCH 2/2] Autobuilder: add GitPoller ChangeSource for SingleBranchScheduler
pul
Quoted 46 lines · On 11 December 2014 at 18:02, <[email protected]> wrote:
From: California Sullivan <[email protected]>
Previously, PBChangeSource was the only option for changesources. PBChangeSource was not always suitable since the remote repository had to be able to run custom hooks, which isn't always available. This commit adds GitPoller as an option.
Signed-off-by California Sullivan <[email protected]>--- lib/python2.7/site-packages/autobuilder/Autobuilder.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)lib/python2.7/site-packages/autobuilder/Autobuilder.py +14
-3@@ -230,14 +230,26 @@ class Autobuilder: if value.has_key('change-password'): passwd=value['change-password'] - self.yocto_sources.append(PBChangeSource(user=user, passwd=passwd)) - branch="master" stabletimer=60 if repo.has_key('branch'): branch = repo['branch'] if value.has_key('stable-timer'): stabletimer = value['stable-timer'] + + if value.has_key('changesource') and value['changesource'] == 'GitPoller': + if value.has_key('interval'): + interval = int(value['interval']) + else: + # default to 5 minutes poll intervals + interval = 60*5 + self.yocto_sources.append(GitPoller(repourl=repo['repourl'], branch=branch, pollInterval=interval)) + log.msg("Adding GitPoller as changesource for " + reponame) + else: + # default to use PBChangeSource as the changesource + self.yocto_sources.append(PBChangeSource(user=user, passwd=passwd)) + log.msg("Adding PBChangeSource as changesource for " + reponame) + self.yocto_sched.append(SingleBranchScheduler(name=str(name), builderNames=['%s' % key], properties=checkoutprops, --
Quoted 2 lines
1.9.3
Pulled into master. Thanks.
Signature · 3 lines
Elizabeth Flanagan Yocto Project Build and Release