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

fix path issue

parent ac68715e
Pipeline #32000 passed with stages
in 1 minute and 32 seconds
......@@ -124,7 +124,7 @@ def _upgrade_installation(chartsDir, projectName, filenameBase, filename=None):
filenameBase,
''
if filename is None
else '-f ' + chartsDir + '/helm-values/' + filename + ' ',
else '-f {}'.format(path.join(chartsDir, 'helm-values', filename)),
chartsDir,
)
proc = subprocess.run(
......@@ -194,7 +194,8 @@ def installFromRepo(pullChartUri):
app.logger.warning(msg)
return output, 'failure'
projectName = listdir(pulledChartsDir)[0]
helmValuesDir = path.join(pulledChartsDir, projectName, "helm-values")
helmChartDir = path.join(pulledChartsDir, projectName)
helmValuesDir = path.join(helmChartDir, 'helm-values')
if path.exists(helmValuesDir):
app.logger.debug('helm value files detected')
for filename in listdir(helmValuesDir):
......@@ -202,13 +203,13 @@ def installFromRepo(pullChartUri):
if '-prod.' in filename and status != 'failure':
app.logger.info('upgrading helm chart {} for prod environment'.format(projectName))
msg, status = _upgrade_installation(
pullChartUri, projectName, filenameBase, filename
helmChartDir, projectName, filenameBase, filename
)
output.append(msg)
elif '-stage.' in filename and status != 'failure':
app.logger.info('upgrading helm chart {} for stage environment'.format(projectName))
msg, status = _upgrade_installation(
pullChartUri, projectName, filenameBase, filename
helmChartDir, projectName, filenameBase, filename
)
output.append(msg)
else:
......
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