Commit 097a3015 authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: /isSRReady check all Software Releases

parent b5861179
...@@ -893,15 +893,18 @@ def readParameters(path): ...@@ -893,15 +893,18 @@ def readParameters(path):
else: else:
return "No such file or directory: %s" % path return "No such file or directory: %s" % path
def isSoftwareReleaseCompleted(config): def areAllSoftwareReleaseCompleted(config):
software_name = getSoftwareReleaseName(config) result_list = []
if software_name is None: for software_release_uri in self.getAvailableSoftwareReleaseURIList(config):
return False software_release_path = os.path.join(
elif os.path.exists(os.path.join(config['software_link'], config['software_root'],
software_name, '.completed')): md5digest(software_release_uri)
return True )
else: if os.path.exists(os.path.join(software_release_path, '.completed')):
return False result_list.append(True)
else:
resultd_list.append(False)
return all(result_list)
def isSoftwareReleaseReady(config): def isSoftwareReleaseReady(config):
"""Return 1 if the Software Release has """Return 1 if the Software Release has
...@@ -913,7 +916,7 @@ def isSoftwareReleaseReady(config): ...@@ -913,7 +916,7 @@ def isSoftwareReleaseReady(config):
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"
updateInstanceParameter(config) updateInstanceParameter(config)
if isSoftwareReleaseCompleted(config): if areAllSoftwareReleaseCompleted(config):
if auto_run: if auto_run:
runSlapgridUntilSuccess(config, 'instance') runSlapgridUntilSuccess(config, 'instance')
return "1" return "1"
......
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