diff --git a/slapos/runner/utils.py b/slapos/runner/utils.py index 5f9b0cc076fdd496c296a1dc20c35b061aff4246..c0bbee2a1fca2e0d5ea3cc98d9321035968cf014 100755 --- a/slapos/runner/utils.py +++ b/slapos/runner/utils.py @@ -807,13 +807,14 @@ def readParameters(path): else: return "No such file or directory: %s" % path + def isSoftwareReleaseReady(config): """Return 1 if the Software Release has correctly been deployed, 0 if not, and 2 if it is currently deploying""" project = os.path.join(config['etc_dir'], '.project') if not os.path.exists(project): - return "0"; + return "0" path = open(project, 'r').readline().strip() software_name = path if software_name[-1] == '/': @@ -832,20 +833,24 @@ def isSoftwareReleaseReady(config): else: return "0" + def cloneDefaultGit(config): """Test if the default git has been downloaded yet If not, download it in read-only mode""" - default_git = os.path.join(config['runner_workdir'], 'project', 'default_repo') + default_git = os.path.join(config['runner_workdir'], + 'project', 'default_repo') if not os.path.exists(default_git): data = {'path': default_git, 'repo': config['default_repo'], } cloneRepo(data) + def buildAndRun(config): runSoftwareWithLock(config) runInstanceWithLock(config) + def setupDefaultSR(config): """If a default_sr is in the parameters, and no SR is deployed yet, setup it diff --git a/slapos/runner/views.py b/slapos/runner/views.py index eca089e286a7c46a1ca20ff083942bd46092ab8a..f8fbae80849a5410c98943584f5a09de63bc8fac 100755 --- a/slapos/runner/views.py +++ b/slapos/runner/views.py @@ -48,6 +48,9 @@ def before_request(): if request.path.startswith('/static'): return + if request.path == '/isSRReady': + return + account = getSession(app.config) if account: session['title'] = getProjectTitle(app.config)