summaryrefslogtreecommitdiff
path: root/source/configure.py
diff options
context:
space:
mode:
Diffstat (limited to 'source/configure.py')
-rw-r--r--source/configure.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/configure.py b/source/configure.py
index 7e62dfd..c342483 100644
--- a/source/configure.py
+++ b/source/configure.py
@@ -16,11 +16,13 @@ def validate_config(config,*keys):
def load_slave_type_configs():
''' load the slave type configs to know which slaves to connect to'''
import yaml, os
+ REPO_DIR = 'ciatconfig/slave-types'
slave_types = []
- for slavetype in os.listdir('ciatconfig/slave-types'):
+ for slavetype in os.listdir(REPO_DIR):
if not slavetype.endswith('.yaml'): continue
- with open(slavetype, 'r') as f:
- config = yaml.load('ciatconfig/slave-types/%s' % f)
+ slavetype_path = os.path.join(REPO_DIR,slavetype)
+ with open(slavetype_path, 'r') as f:
+ config = yaml.load(f)
validate_config(config, 'name','arch')
slave_types.append(config)
return slave_types
@@ -28,11 +30,13 @@ def load_slave_type_configs():
def load_pipeline_configs():
''' load the pipelines '''
import yaml, os
+ REPO_DIR = 'ciatconfig/slave-types'
pipelines = []
- for pipeline in os.listdir('ciatconfig/pipelines'):
+ for pipeline in os.listdir(REPO_DIR):
if not pipeline.endswith('.yaml'): continue
- with open(pipeline, 'r') as f:
- config = yaml.load('ciatconfig/pipelines/%s' % f)
+ pipeline_path = os.path.join(REPO_DIR,pipeline)
+ with open(pipeline_path, 'r') as f:
+ config = yaml.load(f)
validate_config(config,
'name',
'candidate-refs',