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
Gabriel Monnerat
slapos.toolbox
Commits
86b97532
Commit
86b97532
authored
Mar 07, 2018
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a new workspace and remove everytime. THIS SHOULD NOT GO TO MASTER
parent
f0ffc9da
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
slapos/resiliencytest/suites/slaprunner.py
slapos/resiliencytest/suites/slaprunner.py
+3
-3
slapos/runner/gittools.py
slapos/runner/gittools.py
+1
-1
No files found.
slapos/resiliencytest/suites/slaprunner.py
View file @
86b97532
...
@@ -204,7 +204,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
...
@@ -204,7 +204,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
try
:
try
:
data
=
self
.
_connectToSlaprunner
(
data
=
self
.
_connectToSlaprunner
(
resource
=
'cloneRepository'
,
resource
=
'cloneRepository'
,
data
=
'repo=https://lab.nexedi.com/gabriel/slapos.git&name=workspace/
slapos
&email=slapos@slapos.org&user=slapos'
data
=
'repo=https://lab.nexedi.com/gabriel/slapos.git&name=workspace/
gabriel
&email=slapos@slapos.org&user=slapos'
)
)
data
=
json
.
loads
(
data
)
data
=
json
.
loads
(
data
)
if
data
[
'code'
]
==
0
:
if
data
[
'code'
]
==
0
:
...
@@ -213,14 +213,14 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
...
@@ -213,14 +213,14 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
except
(
NotHttpOkException
,
urllib2
.
HTTPError
):
except
(
NotHttpOkException
,
urllib2
.
HTTPError
):
# cloning can be very long.
# cloning can be very long.
# XXX: quite dirty way to check.
# XXX: quite dirty way to check.
while
self
.
_connectToSlaprunner
(
'getProjectStatus'
,
data
=
'project=workspace/
slapos
'
).
find
(
'On branch master'
)
==
-
1
:
while
self
.
_connectToSlaprunner
(
'getProjectStatus'
,
data
=
'project=workspace/
gabriel
'
).
find
(
'On branch master'
)
==
-
1
:
self
.
logger
.
info
(
'git-cloning ongoing, sleeping...'
)
self
.
logger
.
info
(
'git-cloning ongoing, sleeping...'
)
def
_openSoftwareRelease
(
self
,
software_release
=
'erp5testnode/testsuite/dummy'
):
def
_openSoftwareRelease
(
self
,
software_release
=
'erp5testnode/testsuite/dummy'
):
self
.
logger
.
debug
(
'Opening %s software release...'
%
software_release
)
self
.
logger
.
debug
(
'Opening %s software release...'
%
software_release
)
data
=
self
.
_connectToSlaprunner
(
data
=
self
.
_connectToSlaprunner
(
resource
=
'setCurrentProject'
,
resource
=
'setCurrentProject'
,
data
=
'path=workspace/
slapos
/software/%s/'
%
software_release
data
=
'path=workspace/
gabriel
/software/%s/'
%
software_release
)
)
if
json
.
loads
(
data
)[
'code'
]
==
0
:
if
json
.
loads
(
data
)[
'code'
]
==
0
:
self
.
logger
.
warning
(
data
[
'result'
])
self
.
logger
.
warning
(
data
[
'result'
])
...
...
slapos/runner/gittools.py
View file @
86b97532
...
@@ -23,7 +23,7 @@ def cloneRepo(url, workDir, user="", email=""):
...
@@ -23,7 +23,7 @@ def cloneRepo(url, workDir, user="", email=""):
return
jsonify
(
code
=
0
,
return
jsonify
(
code
=
0
,
result
=
"Can not create project folder."
)
result
=
"Can not create project folder."
)
if
os
.
path
.
exists
(
workDir
)
and
len
(
os
.
listdir
(
workDir
))
<
2
:
if
os
.
path
.
exists
(
workDir
):
shutil
.
rmtree
(
workDir
)
# delete useless files
shutil
.
rmtree
(
workDir
)
# delete useless files
repo
=
Repo
.
clone_from
(
url
,
workDir
)
repo
=
Repo
.
clone_from
(
url
,
workDir
)
config_writer
=
repo
.
config_writer
()
config_writer
=
repo
.
config_writer
()
...
...
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