summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Holland <william.holland@codethink.co.uk>2015-09-30 22:19:51 +0100
committerWill Holland <william.holland@codethink.co.uk>2015-09-30 22:19:51 +0100
commit1e5c62ef9b93a682dca25810e4b72c5cb38f5f5f (patch)
tree03c1cfa7aa68973d1fb50f03818820c2732f5419
parente060dd235db75fe044e4831b1f099c1d5d6bb5a8 (diff)
downloadorchestration-1e5c62ef9b93a682dca25810e4b72c5cb38f5f5f.tar.gz
Fix last fix which was stupid
-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',