def generate_jjb_jobs(out_dir): jjb_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../jjb') jjb_test = JenkinsJobs(args=['test', jjb_dir, '-o', out_dir]) # Fake the list of plugins to skip retrieval jjb_test.jjb_config.builder['plugins_info'] = [] jjb_test.execute()
def generate_jjb_jobs(out_dir): jjb_dir = os.path.join( os.path.dirname(os.path.abspath(__file__)), '../jjb') jjb_test = JenkinsJobs(args=['test', jjb_dir, '-o', out_dir]) # Fake the list of plugins to skip retrieval jjb_test.jjb_config.builder['plugins_info'] = [] jjb_test.execute()
def run_jjb(self, name, jobname=None): filename = os.path.join(fixtures_path, name + '.xml') root = get_xml_root(filename=filename) if jobname is None: jobname = name yaml = root_to_yaml(root, jobname) # Run this wrecker YAML thru JJB. with tempfile.NamedTemporaryFile('w') as temp: temp.write(yaml) temp.flush() jjb = JenkinsJobs(['test', temp.name]) assert jjb.execute() is None