Verified Commit 4e9473e2 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

keep whitespace in command

parent d320ae29
Pipeline #32003 passed with stages
in 1 minute and 44 seconds
......@@ -124,7 +124,7 @@ def _upgrade_installation(chartsDir, projectName, filenameBase, filename=None):
filenameBase,
''
if filename is None
else '-f {}'.format(path.join(chartsDir, 'helm-values', filename)),
else '-f {} '.format(path.join(chartsDir, 'helm-values', filename)),
chartsDir,
)
proc = subprocess.run(
......@@ -198,6 +198,7 @@ def installFromRepo(pullChartUri):
helmValuesDir = path.join(helmChartDir, 'helm-values')
if path.exists(helmValuesDir):
app.logger.debug('helm value files detected')
valuesFound = False
for filename in listdir(helmValuesDir):
filenameBase = path.splitext(filename)[0]
if '-prod.' in filename and status != 'failure':
......@@ -206,17 +207,19 @@ def installFromRepo(pullChartUri):
helmChartDir, projectName, filenameBase, filename
)
output.append(msg)
valuesFound = True
elif '-stage.' in filename and status != 'failure':
app.logger.info('upgrading helm chart {} for stage environment'.format(projectName))
msg, status = _upgrade_installation(
helmChartDir, projectName, filenameBase, filename
)
output.append(msg)
else:
msg = 'no helm chart for prod or stage environment found'
app.logger.info(msg)
output.append(msg)
status = 'ignore'
valuesFound = True
if not valuesFound:
msg = 'no helm chart for prod or stage environment found'
app.logger.info(msg)
output.append(msg)
status = 'ignore'
else:
msg = 'Could not find path to exported helm chart'
app.logger.warn(msg)
......
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