INNER CODE UNIT · Python
start_chartmuseum
helm/chartmuseum · acceptance_tests/lib/ChartMuseum.py:18
def start_chartmuseum(self, storage):
self.stop_chartmuseum()
os.chdir(self.rootdir)
cmd = 'KILLME=1 chartmuseum --debug --port=%d --storage="%s" ' % (common.PORT, storage)
if storage == 'local':
shutil.rmtree(common.STORAGE_DIR, ignore_errors=True)
cmd += '--storage-local-rootdir=%s >> %s 2>&1' % (common.STORAGE_DIR, common.LOGFILE)
elif storage == 'amazon':
cmd += '--storage-amazon-bucket="%s" --storage-amazon-prefix="%s" --storage-amazon-region="%s" >> %s 2>&1' \
% (common.STORAGE_AMAZON_BUCKET, common.STORAGE_AMAZON_PREFIX, common.STORAGE_AMAZON_REGION, common.LOGFILE)
elif storage == 'google':
cmd += '--storage-google-bucket="%s" --storage-google-prefix="%s" >> %s 2>&1' \
% (common.STORAGE_GOOGLE_BUCKET, common.STORAGE_GOOGLE_PREFIX, common.LOGFILE)
elif storage == 'microsoft':
cmd += '--storage-microsoft-container="%s" --storage-microsoft-prefix="%s" >> %s 2>&1' \
% (common.STORAGE_MICROSOFT_CONTAINER, common.STORAGE_MICROSOFT_PREFIX, common.LOGFILE)
elif storage == 'alibaba':
cmd += '--storage-alibaba-bucket="%s" --storage-alibaba-prefix="%s" --storage-alibaba-endpoint="%s" >> %s 2>&1' \