From c694410fe86284f0fff49865308e81f2466abe70 Mon Sep 17 00:00:00 2001 From: Will Holland Date: Thu, 1 Oct 2015 00:55:27 +0100 Subject: Bottlerock call correct category --- source/configure.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'source/configure.py') diff --git a/source/configure.py b/source/configure.py index e719c45..30c6d2a 100644 --- a/source/configure.py +++ b/source/configure.py @@ -34,19 +34,15 @@ def load_pipeline_configs(): pipelines = [] for pipeline in os.listdir(REPO_DIR): if not pipeline.endswith('.yaml'): continue - print "file %s ends in .yaml" % pipeline pipeline_path = os.path.join(REPO_DIR,pipeline) - print "path %s" % pipeline_path with open(pipeline_path, 'r') as f: config = yaml.load(f) - print "file loaded" validate_config(config, 'name', 'candidate-refs', 'slave-type', 'clusters', 'steps') - print "file validated" pipelines.append(config) return pipelines @@ -66,6 +62,19 @@ def get_columns(): columns += pipeline.columns return columns +def get_candidate_refs(): + global pipelines + candidate_refs = [] + for pipeline in pipelines: + candidate_refs += pipeline.candidate_refs + return candidate_refs + +def pipeline_from_candidate_ref(ref): + global pipelines + for p in pipelines: + if ref in p.candidate_refs: + return p + def configure(): from ciatlib.master import pipeline_from_dict global slave_types -- cgit v1.2.1