Example #1
0
def get_devtools_jobs(devtools_fp):
    builder = Builder("None", None, None, None, plugins_list={})

    builder.load_files(devtools_fp)
    builder.parser.expandYaml()
    builder.parser.generateXML()

    return [job.name for job in builder.parser.xml_jobs]
Example #2
0
def get_jjb_jobs(index_raw):
    """
    Returns an array with job names. +index_raw+ can be a URL or a path.
    This method uses the actual jenkins_jobs builder package to process the jobs.
    """

    if index_raw.startswith('http'):
        index_fp = urllib2.urlopen(index_raw)
    else:
        index_fp = open(index_raw, 'r')

    builder = Builder("None", None, None, None, plugins_list={})

    builder.load_files(index_fp)
    builder.parser.expandYaml()
    builder.parser.generateXML()

    index_fp.close()

    return [job.name for job in builder.parser.xml_jobs]