1.get code 2.替换配置文件 3.BUILD 4.SCP 5.deploydaxiang
1> get code ssh://git@git.jc:2222/elephant_bg/daxiang.git
ssh root@10.0.31.120 ####登录到编译的机器cd /opt/daxiang ####代码路径git pull ####拉取最新的代码git branch -a ###查看当前分支git checkout xxx ###切换到要发布的分支xxx
2>替换配置文件\cp -rf /data/jconfig/daxiang/build/pre ./build/ ###
3>BUILD rm -rf ~/.m2/repository/com/jcgroup/daxiang/***** mvn clean install -Dmaven.test.skip=true -Pxxx****
4>SCPscp service/facade/target/service-facade-1.0.0.jar root@op01:/opt/daxiang/war ### SCP 到跳板机
5>deployssh op01** ###登陆到跳板机ansible youxiang-daxiang-xxx -s -m copy -a 'src=/opt/daxiang/war/service-facade-1.0.0.jar dest=/home/daxiang/ owner=daxiang group=daxiang backup=yes' ###分发包部署,youxiang-daxiang-xxx替代你要分发的机器ansible youxiang-daxiang-xxx -m shell -a "python /tools/ele.py restart" ####youxiang-daxiang-xxx替代你要发布的机器
customercore
1>get code ssh://git@git.jc:2222/elephant_bg/customercore.git
ssh root@10.0.31.120 ####登录到编译的机器cd /opt/customercore ####代码路径git pull ####拉取最新的代码git branch -a ###查看当前分支git checkout xxx ###切换到要发布的分支xxx
2>修改配置文件
\cp -rf /data/jconfig/customercore/build/pre ./build sed -i '12s/jar/war/g' /opt/customercore/app/web/service/pom.xml #### 将app/web/service pom.xml中<packaging>jar</packaging>替换为<packaging>war</packaging>
3>BUILD
rm -rf ~/.m2/repository/com/jcgroup/daxiang/ mvn clean install -Dmaven.test.skip=true -Pxxx
4>SCP
scp -r service/target/customercore.war root@op01:/opt/customercore/war ### SCP 到跳板机
5>deployssh op01* ###登陆到跳板机ansible youxiang-customercore-xxx -s -m copy -a 'src=/opt/customercore/war/customercore.war dest=/home/customercore/ owner=customercore group=customercore backup=yes' ###分发包部署,youxiang-customercore-xxx替代你要分发的机器**ansible youxiang-customercore-xxx -m shell -a "python /tools/tomcat_customercore.py restart" ####youxiang-customercore-xxx替代你要发布的机器
component
1>mvn clean install -Dmaven.test.skip=true -Pxxx
.......
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 转载请注明出处:http://blog.csdn.net/u011479494/article/details/5...