Commit 0e544151 authored by Philip ABBET's avatar Philip ABBET
Browse files

Change the way volumes are mounted into docker images

parent 25f9ba9c
Pipeline #12115 failed with stage
in 14 minutes and 12 seconds
......@@ -306,37 +306,42 @@ class Agent(object):
volumes = {}
if not configuration.proxy_mode:
for name, details in configuration.data['inputs'].items():
if 'database' in details:
continue
basename = os.path.join(configuration.cache, details['path'])
filenames = glob.glob(basename + '*.data')
filenames.extend(glob.glob(basename + '*.data.checksum'))
filenames.extend(glob.glob(basename + '*.data.index'))
filenames.extend(glob.glob(basename + '*.data.index.checksum'))
for filename in filenames:
volumes[filename] = {
'bind': os.path.join('/cache', filename.replace(configuration.cache + '/', '')),
'mode': 'ro',
}
if 'result' in configuration.data:
outputs_config = {
'result': configuration.data['result']
}
else:
outputs_config = configuration.data['outputs']
for name, details in outputs_config.items():
basename = os.path.join(configuration.cache, details['path'])
dirname = os.path.dirname(basename)
volumes[dirname] = {
'bind': os.path.join('/cache', dirname.replace(configuration.cache + '/', '')),
'mode': 'rw',
}
volumes[configuration.cache] = {
'bind': '/cache',
'mode': 'rw',
}
# for name, details in configuration.data['inputs'].items():
# if 'database' in details:
# continue
#
# basename = os.path.join(configuration.cache, details['path'])
# filenames = glob.glob(basename + '*.data')
# filenames.extend(glob.glob(basename + '*.data.checksum'))
# filenames.extend(glob.glob(basename + '*.data.index'))
# filenames.extend(glob.glob(basename + '*.data.index.checksum'))
#
# for filename in filenames:
# volumes[filename] = {
# 'bind': os.path.join('/cache', filename.replace(configuration.cache + '/', '')),
# 'mode': 'ro',
# }
#
# if 'result' in configuration.data:
# outputs_config = {
# 'result': configuration.data['result']
# }
# else:
# outputs_config = configuration.data['outputs']
#
# for name, details in outputs_config.items():
# basename = os.path.join(configuration.cache, details['path'])
# dirname = os.path.dirname(basename)
#
# volumes[dirname] = {
# 'bind': os.path.join('/cache', dirname.replace(configuration.cache + '/', '')),
# 'mode': 'rw',
# }
self.process = dock.Popen(
host,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment