美文网首页
jenkins-cmd

jenkins-cmd

作者: 泠泉 | 来源:发表于2019-04-16 18:31 被阅读0次
project_name=RestAPI
jar_name=myAPI.jar


server_location=/data/app/RestAPI/$project_name

ssh mytomcat@123.116.11.123 "$server_location/service.sh stop"
ssh mytomcat@123.116.11.123 "$server_location/service.sh backup"
scp /data/resources/jenkins/workspace/$project_name/target/$jar_name mytomcat@123.116.11.123:$server_location/$jar_name
ssh mytomcat@123.116.11.123 "source /etc/profile &&  BUILD_ID=dontKillMe  $server_location/service.sh start"

sleep 60


ssh mytomcat@123.116.11.236 "$server_location/service.sh stop"
ssh mytomcat@123.116.11.236 "$server_location/service.sh backup"
scp /data/resources/jenkins/workspace/$project_name/target/$jar_name mytomcat@123.116.11.236:$server_location/$jar_name
ssh mytomcat@123.116.11.236 "source /etc/profile &&  BUILD_ID=dontKillMe  $server_location/service.sh start"

相关文章

网友评论

      本文标题:jenkins-cmd

      本文链接:https://www.haomeiwen.com/subject/qfdiwqtx.html