【自动构建系列】自动部署环境的shell脚本
最近项目组在推行自动构建,在每次build完了之后,需要自动把文件部署到linux服务器上,因此根据项目的具体的情况,写了一个shell脚本,供自动构建工具来调用执行部署。 粗略的思路就是:停止系统-->备份现有的环境-->部署新build的文件-->修改需要修改的配置文件(如果需要)-->启动系统 大致脚本如下: #!/bin/bashDAY=`date +%Y-%m-%d-%H:%M:%S`#the path for deleting the log and tmpAPP_MAIN_PATH=/data/yousystem/jboss-5.1.0.GA/server/default#the key word for searching the process idPID_MSG=yousystem/#msg of the file which is running now,backup it.APP_FILE_NAME1=yousystem.warAPP_FILE_PATH1=/data/yousystem/jboss-5.1.0.GA/server/default/deploy#msg of the start file which is used to start the systemAPP_START_FILE=app-run.shAPP_START_PATH=/data