Commit 50948d5b authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: if no "slapos-software" is defined in parameters, the auto build&run feature shouldn't work

parent 3005b789
...@@ -840,8 +840,10 @@ def isSoftwareReleaseReady(config): ...@@ -840,8 +840,10 @@ def isSoftwareReleaseReady(config):
"""Return 1 if the Software Release has """Return 1 if the Software Release has
correctly been deployed, 0 if not, correctly been deployed, 0 if not,
and 2 if it is currently deploying""" and 2 if it is currently deploying"""
auto_deploy = config['auto_deploy'] in TRUE_VALUES slapos_software = (False if config.get('slapos-software', None) is None else True)
auto_run = config['autorun'] in TRUE_VALUES # auto_deploy and auto_run are True only if slapos_software has been declared
auto_deploy = (config['auto_deploy'] in TRUE_VALUES) and slapos_software
auto_run = (config['autorun'] in TRUE_VALUES) and slapos_software
project = os.path.join(config['etc_dir'], '.project') project = os.path.join(config['etc_dir'], '.project')
if not ( os.path.exists(project) and (auto_run or auto_deploy) ): if not ( os.path.exists(project) and (auto_run or auto_deploy) ):
return "0" return "0"
......
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