Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hardik Juneja
slapos.toolbox
Commits
7d35988b
Commit
7d35988b
authored
Oct 16, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: authorizes the automatically deploying of the Software Release
parent
f26d41d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
slapos/runner/utils.py
slapos/runner/utils.py
+7
-2
slapos/runner/views.py
slapos/runner/views.py
+3
-0
No files found.
slapos/runner/utils.py
View file @
7d35988b
...
...
@@ -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
...
...
slapos/runner/views.py
View file @
7d35988b
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment