summaryrefslogtreecommitdiff
path: root/source/configure.py
diff options
context:
space:
mode:
Diffstat (limited to 'source/configure.py')
-rw-r--r--source/configure.py17
1 files changed, 13 insertions, 4 deletions
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