def __init__(self, pipeline_name, pipeline_counter, stage_index, stage_name, job_name): super().__init__(pipeline_name, pipeline_counter, stage_index, stage_name, job_name) self.success, self.response = go_client().request_junit_report( pipeline_name, pipeline_counter, stage_index, stage_name, job_name) self.console_log = go_client().request_console_log( pipeline_name, pipeline_counter, stage_index, stage_name, job_name)
def main(): if 'FILE_CLIENT' in app.config: go_client(app.config['FILE_CLIENT']) else: go_client( app.config['GO_SERVER_URL'], (app.config['GO_SERVER_USER'], app.config['GO_SERVER_PASSWD'])) get_connection(app.config.get('DB_PATH')) get_all_pipeline_groups()
def main(): if 'FILE_CLIENT' in app.config: go_client(app.config['FILE_CLIENT']) else: go_client( app.config['GO_SERVER_URL'], (app.config['GO_SERVER_USER'], app.config['GO_SERVER_PASSWD']) ) get_connection(app.config.get('DB_PATH')) get_all_pipeline_groups()
def setup_go_client(pargs): application_cfg_path = pargs.app_cfg app_config.create_app_config(application_cfg_path) file_source = pargs.file_source if file_source: app_config.get_app_config().cfg['GO_SERVER_URL'] = file_source go_client.go_client(app_config.get_app_config().cfg['GO_SERVER_URL'], (app_config.get_app_config().cfg['GO_SERVER_USER'], app_config.get_app_config().cfg['GO_SERVER_PASSWD']))
def setup_go_client(pargs): application_cfg_path = pargs.app_cfg app_config.create_app_config(application_cfg_path) file_source = pargs.file_source if file_source: app_config.get_app_config().cfg['GO_SERVER_URL'] = file_source go_client.go_client( app_config.get_app_config().cfg['GO_SERVER_URL'], (app_config.get_app_config().cfg['GO_SERVER_USER'], app_config.get_app_config().cfg['GO_SERVER_PASSWD']) )
def pipeline_is_paused(pipeline_name): if 'GO_SERVER_USER' in app.config: response = go_client().get_pipeline_status(pipeline_name) status = json.loads(response) if status["paused"]: return status.get("pausedCause") or 'Paused', status.get("pausedBy") return None, None
def pipeline_is_paused(pipeline_name): if 'GO_SERVER_USER' in app.config: response = go_client().get_pipeline_status(pipeline_name) status = json.loads(response) if status["paused"]: return status.get("pausedCause") or 'Paused', status.get( "pausedBy") return None, None
def __init__(self, pipeline_name, pipeline_counter, stage_index, stage_name, job_name): super().__init__(pipeline_name, pipeline_counter, stage_index, stage_name, job_name) ### success, response = go_client().request_junit_report( pipeline_name, pipeline_counter, stage_index, stage_name, job_name) ### self.response = response self.console_log = response self.success = success
def open_html(pipeline_name, current, comparison): html = go_client().request_comparison_html(pipeline_name, current, comparison) soup = BeautifulSoup(html, "html.parser") return soup
self.nodes = [(prefix, json_structure)] @classmethod def json_nodes_list(cls, json_structure, prefix=None): result = [] for elm in json_structure: result.extend(cls(elm, prefix).nodes) return result @classmethod def json_nodes_dict(cls, json_structure, prefix=None): result = [] for key, value in json_structure.items(): if not prefix: new_prefix = key else: new_prefix = prefix + '.' + key result.extend(cls(value, new_prefix).nodes) return result if __name__ == '__main__': setup_go_client(parse_args()) go = go_client.go_client() db = data_access.get_connection(app_config.get_app_config().cfg['DB_PATH']) controller = SyncController(db, go) log("Starting synchronization.") controller.sync() log("Synchronization finished.") log('Done!')
def setUp(self): self.db = SQLConnection(':memory:', foreign_keys=False) self.go = go_client('data') self.controller = SyncController(self.db, self.go)