Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
01ceadd5
authored
Nov 04, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fab: add cleanup function
fixes
#340
parent
8eb07036
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
circle/fabfile.py
+18
-0
No files found.
circle/fabfile.py
View file @
01ceadd5
...
@@ -107,6 +107,7 @@ def update_portal(test=False):
...
@@ -107,6 +107,7 @@ def update_portal(test=False):
"Update and restart portal+manager"
"Update and restart portal+manager"
with
_stopped
(
"portal"
,
"manager"
):
with
_stopped
(
"portal"
,
"manager"
):
pull
()
pull
()
cleanup
()
pip
(
"circle"
,
"~/circle/requirements.txt"
)
pip
(
"circle"
,
"~/circle/requirements.txt"
)
migrate
()
migrate
()
compile_things
()
compile_things
()
...
@@ -126,10 +127,15 @@ def update_node():
...
@@ -126,10 +127,15 @@ def update_node():
with
_stopped
(
"node"
,
"agentdriver"
,
"monitor-client"
):
with
_stopped
(
"node"
,
"agentdriver"
,
"monitor-client"
):
pull
(
"~/vmdriver"
)
pull
(
"~/vmdriver"
)
pip
(
"vmdriver"
,
"~/vmdriver/requirements/production.txt"
)
pip
(
"vmdriver"
,
"~/vmdriver/requirements/production.txt"
)
_cleanup
(
"~/vmdriver"
)
pull
(
"~/agentdriver"
)
pull
(
"~/agentdriver"
)
pip
(
"agentdriver"
,
"~/agentdriver/requirements.txt"
)
pip
(
"agentdriver"
,
"~/agentdriver/requirements.txt"
)
_cleanup
(
"~/agentdriver"
)
pull
(
"~/monitor-client"
)
pull
(
"~/monitor-client"
)
pip
(
"monitor-client"
,
"~/monitor-client/requirements.txt"
)
pip
(
"monitor-client"
,
"~/monitor-client/requirements.txt"
)
_cleanup
(
"~/monitor-client"
)
@parallel
@parallel
...
@@ -151,6 +157,18 @@ def checkout(vmdriver="master", agent="master"):
...
@@ -151,6 +157,18 @@ def checkout(vmdriver="master", agent="master"):
run
(
"git checkout
%
s"
%
agent
)
run
(
"git checkout
%
s"
%
agent
)
@roles
(
'portal'
)
def
cleanup
():
"Clean pyc files of portal"
_cleanup
()
def
_cleanup
(
dir
=
"~/circle/circle"
):
"Clean pyc files"
with
cd
(
"~/circle/circle"
):
run
(
"find -name '*.py[co]' -exec rm -f {} +"
)
def
_stop_services
(
*
services
):
def
_stop_services
(
*
services
):
"Stop given services (warn only if not running)"
"Stop given services (warn only if not running)"
with
settings
(
warn_only
=
True
):
with
settings
(
warn_only
=
True
):
...
...
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