Commit 7d35988b authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: authorizes the automatically deploying of the Software Release

parent f26d41d7
......@@ -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
......
......@@ -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)
......
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