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

log strange cases

parent 58c54e0f
Pipeline #31995 passed with stages
in 1 minute and 33 seconds
......@@ -195,20 +195,32 @@ def installFromRepo(pullChartUri):
return output, 'failure'
projectName = listdir(pulledChartsDir)[0]
helmValuesDir = path.join(pulledChartsDir, projectName, "helm-values")
# TODO: Remove later
app.logger.info(helmValuesDir)
if path.exists(helmValuesDir):
# TODO: Change to debug later
app.logger.info('helm value files detected')
app.logger.debug('helm value files detected')
for filename in listdir(helmValuesDir):
filenameBase = path.splitext(filename)[0]
if ('-prod.' in filename or '-stage.' in filename) and status != 'failure':
# TODO: Remove later
app.logger.info('upgrade installation for ' + filename)
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
)
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
)
output.append(msg)
else:
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)
output.append(msg)
status = 'failure'
rmtree(pulledChartsDir)
return output, status
......@@ -247,6 +259,7 @@ def installFromDir(repositoryUrl, projectName):
output.append(msg)
else:
# this section should be obsolete since we shouldn't have helm-charts w/o valuefiles
app.logger.warn('no helm-values directory found. this is DEPRECATED')
msg, status = _upgrade_installation(helmChartDir, projectName, projectName)
output.append(msg)
rmtree(repoDir)
......
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