关键点:
daemonize -E
BUILD_ID=dontKillMe
sleep 10s
把执行的sh脚本全输入在执行命令框内
source /etc/profile
cd /usr/local/java
ps -ef | grep java | grep -v grep | grep springboot-quartz-0.0.1-SNAPSHOT.jar|awk '{print $2}' | xargs kill -9
cp /var/jenkins_mount/workspace/NCSH/target/springboot-quartz-0.0.1-SNAPSHOT.jar /usr/local/java
daemonize -E
BUILD_ID=dontKillMe
nohup java -jar /usr/local/java/springboot-quartz-0.0.1-SNAPSHOT.jar &
sleep 10s