2020
09-25
09-25
Jenkins自动化部署springboot代码实例
一、linux按jar包名称部署1.执行shellPID=$(ps-ef|grepapp.jar|grep-vgrep|awk'{print$2}')if[-z"$PID"]thenechoApplicationisalreadystoppedelseechokill$PIDkill$PIDfi2.调用顶层maven目标cleanpackage-Dmaven.test.skip=true3.执行shellcdtargetBUILD_ID=dontKillMenohupjava-jarapp.jar&二、linux按端口部署1.执行shellPID=$(lsof-i:端口号|awk'{print$2}'|tail-n1)if[-z"$P...
继续阅读 >