Github user dmitriy-barkalov commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/37#discussion_r26200013
  
    --- Diff: buildbot-conf/cordova-internal.conf ---
    @@ -0,0 +1,101 @@
    +import os
    +import json
    +
    +from buildbot.changes.gitpoller import GitPoller
    +from buildbot.schedulers.forcesched import ForceScheduler
    +
    +# config
    +MEDIC_CONFIG_FILE    = os.path.join(FP, 'cordova-config.json')
    +PROJECTS_CONFIG_FILE = os.path.join(FP, 'cordova-repos.json')
    +
    +def parse_config_file(file_name):
    +    with open(file_name, 'r') as config_file:
    +        return json.load(config_file)
    +
    +medic_config    = parse_config_file(MEDIC_CONFIG_FILE)
    +projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
    +
    +# constants
    +GIT_BIN       = 'git' if os.name != 'nt' else 'C:\Program Files 
(x86)\Git\cmd\git.exe'
    +GITPOLLER_DIR = 'gitpoller-workdir'
    +
    +POLLED_PROJECT_PATTERNS = [
    +    'cordova-mobile-spec',
    +    'cordova-lib',
    +    'cordova-js',
    +    'cordova-cli',
    +    'cordova-medic',
    +    'cordova-plugman',
    +    'cordova-windows',
    +    'cordova-android',
    +]
    +
    +####### UTILITIES
    +
    +# helpers
    +def cordova_builders():
    +    return [b.name for b in c['builders'] if b.name.startswith('cordova-')]
    +
    +def is_polled_project(project_name):
    +    return True if any(pattern in project_name for pattern in 
POLLED_PROJECT_PATTERNS) else False
    +
    +def get_polled_projects():
    +    return (project for project_name, project in projects_config.items() 
if is_polled_project(project_name))
    +
    +def make_git_poller(repo_uri):
    +    # NOTE:
    +    #      branches=True means watching all branches
    +    return GitPoller(repo_uri, workdir=GITPOLLER_DIR, branches=True, 
pollinterval=120, gitbin=GIT_BIN)
    --- End diff --
    
    Some unrelated builds could start using this logic. E.g. start build of 
Windows platform on commit to Android platform. Seems this functionality is not 
ready yet. I propose to exclude it from this PR. Current medic also doesn't 
have builds by commit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to