import environment from buildbot import BuildExitCode from config import config from jenkins import JenkinsDefaultValueAction here = os.path.dirname(os.path.abspath(__file__)) # Activate the environment, and create if necessary venv_path = 'treeherder_venv' if environment.exists(venv_path): environment.activate(venv_path) else: environment.create(venv_path, os.path.join(here, 'requirements.txt')) # Can only be imported after the environment has been activated import mozinfo from redo import retriable from s3 import S3Bucket from thclient import TreeherderClient, TreeherderJob, TreeherderJobCollection JOB_FRAGMENT = '/#/jobs?repo={repository}&revision={revision}' BUILD_STATES = ['running', 'completed'] logging.basicConfig(format='%(asctime)s %(levelname)s | %(message)s', datefmt='%H:%M:%S') logger = logging.getLogger('mozmill-ci')
action=JenkinsDefaultValueAction, help='The number of the partial update: today - N days') return vars(parser.parse_args()) if __name__ == '__main__': logger.info('Run as: {}'.format(sys.argv)) kwargs = parse_args() # Activate the environment, and create if necessary import environment if environment.exists(kwargs['venv_path']): environment.activate(kwargs['venv_path']) else: environment.create(kwargs['venv_path'], os.path.join(here, 'requirements.txt')) # Can only be imported after the environment has been activated import mozinfo import requests from s3 import S3Bucket from thclient import TreeherderClient, TreeherderJob, TreeherderJobCollection settings = config['test_types'][kwargs['test_type']] th = Submission(kwargs['repository'], kwargs['revision'][:12], treeherder_url=kwargs['treeherder_url'], treeherder_client_id=kwargs['treeherder_client_id'], treeherder_secret=kwargs['treeherder_secret'], settings=settings)
from urlparse import urljoin import environment from buildbot import BuildExitCode from config import config from jenkins import JenkinsDefaultValueAction here = os.path.dirname(os.path.abspath(__file__)) # Activate the environment, and create if necessary venv_path = 'treeherder_venv' if environment.exists(venv_path): environment.activate(venv_path) else: environment.create(venv_path, os.path.join(here, 'requirements.txt')) # Can only be imported after the environment has been activated import mozinfo from redo import retriable from s3 import S3Bucket from thclient import TreeherderClient, TreeherderJob, TreeherderJobCollection JOB_FRAGMENT = '/#/jobs?repo={repository}&revision={revision}' BUILD_STATES = ['running', 'completed'] logging.basicConfig(format='%(asctime)s %(levelname)s | %(message)s', datefmt='%H:%M:%S') logger = logging.getLogger('mozmill-ci')