time=`date +%Y-%m-%d` rm -rf /root/voiceapi/jenkins/voiceapi/$time mv /root/voiceapi/jenkins/voiceapi/$BUILD_NUMBER /root/voiceapi/jenkins/voiceapi/$time ps -ef | grep VoiceAPI-fat.jar | grep -v grep | awk '{print $2}' | xargs kill -9 rm -rf /root/voiceapi/VoiceAPI-fat.jar sleep 1s cp /root/voiceapi/jenkins/voiceapi/$time/VoiceAPI-fat.jar /root/voiceapi/ sleep 1s /root/voiceapi/start.sh
Jenkins打包复制远程机器的脚本
点赞
收藏