1. 程式人生 > 其它 >jenkins 自動部署指令碼

jenkins 自動部署指令碼

OLD_BUILD_ID=$BUILD_ID
echo $OLD_BUILD_ID
BUILD_ID=dontKillMe

 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-system/target/system/lib /mnt/safety/amdin/system
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-system/target/system/system-safety.jar /mnt/safety/amdin/system
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-system/target/system/resources/mapper /mnt/safety/amdin/system/resources
 
 
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-examination/target/exam/lib /mnt/safety/amdin/exam
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-examination/target/exam/system-exam.jar /mnt/safety/amdin/exam
 
 
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-collection/target/collection/lib /mnt/safety/amdin/collection
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-collection/target/collection/system-collection.jar /mnt/safety/amdin/collection
 
 
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-gateway/target/gateway/lib /mnt/safety/amdin/gateway
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-gateway/target/gateway/gateway-safety.jar /mnt/safety/amdin/gateway

 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-auth/target/auth/lib /mnt/safety/amdin/auth
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-auth/target/auth/auth-safety.jar /mnt/safety/amdin/auth

 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-emergency/target/emergency/lib /mnt/safety/amdin/emergency
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-emergency/target/emergency/safety-emergency.jar /mnt/safety/amdin/emergency
 
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-document/target/document/lib /mnt/safety/amdin/document
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-document/target/document/safety-document.jar /mnt/safety/amdin/document

 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-expert/target/expert/lib /mnt/safety/amdin/expert
 \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-expert/target/expert/safety-expert.jar /mnt/safety/amdin/expert

cd /mnt/safety/amdin/system
./service.sh restart
cd /mnt/safety/amdin/auth
./service.sh restart
cd /mnt/safety/amdin/gateway
./service.sh restart
cd /mnt/safety/amdin/collection
./service.sh restart
cd /mnt/safety/amdin/emergency
./service.sh restart
cd /mnt/safety/amdin/document
./service.sh restart
cd /mnt/safety/amdin/expert
./service.sh restart