File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+ from fabric .api import *
3
+ from datetime import datetime
4
+
5
+ env .user = 'root'
6
+ env .hosts = ['spring-abc.xyz:29244' ]
7
+ shutdown = '../../bin/shutdown.sh'
8
+ startup = '../../bin/startup.sh'
9
+ target_classes_dir = './target/springabc'
10
+ web_root_dir = '../../webapps/ROOT/'
11
+
12
+ def update ():
13
+ # 使用 ./ 表示当前目录
14
+ local ('git pull' )
15
+
16
+ def install ():
17
+ local ('mvn install -DskipTests' )
18
+
19
+ def reboot ():
20
+ local (shutdown )
21
+ local (startup )
22
+
23
+ def startup ():
24
+ local (startup )
25
+
26
+ def shutdown ():
27
+ local (shutdown )
28
+
29
+ def deploy ():
30
+ '''
31
+ 部署文件
32
+ '''
33
+ local (shutdown )
34
+ install ()
35
+
36
+ local ('rm -rf %s* ' % web_root_dir )
37
+ local ('mv %s/* %s' % (target_classes_dir , web_root_dir ))
You can’t perform that action at this time.
0 commit comments