• jenkins:构建机器为windows,部署机器为linux


    备份老的jar包

    d=`date +"%Y%m%d-%H%M%S"`
    
    cd /home/eccore/app/uat
    
    mv steward-api-3.0.0-SNAPSHOT.jar steward-api-3.0.0-SNAPSHOT-$d.jar

    从windows向linux传输文件

    cd C:WindowsSystem32
    pscp.exe -l eccore -pw "!**密码**" -r "E:sonarworkspaceA网-客户管家项目-后台部署steward-api	argetsteward-api-3.0.0-SNAPSHOT.jar"  eccore@10.130.37.64:/home/eccore/app/uat

    杀进程并启动

    cd /home/eccore/app/uat
    
    ps -ef | grep java | grep -v grep | awk '{print $2}' | xargs kill -9
    
    sh start.sh

    start.sh内容如下

    nohup /usr/local/java/jre/bin/java -jar /home/eccore/app/uat/steward-api-3.0.0-SNAPSHOT.jar --spring.profiles.active=uat --hostname=vmt10482-webapiuat -Xms256m -Xmx1024m --logging.level.root=debug >/dev/null 2>&1 &
  • 相关阅读:
    Best Time to Buy and Sell Stock II
    Subsets II
    Subsets I
    Combinations
    Permutation Sequence
    Next Permutation
    Anagrams
    Combination-Sum II
    Combination-Sum I
    Permutations II
  • 原文地址:https://www.cnblogs.com/gcgc/p/10936944.html
Copyright © 2020-2023  润新知