zoukankan      html  css  js  c++  java
  • Jenkins+gitLab发布java程序

    1.登录jenkins

    • http://ip:12000

    2.新建任务

    2.1 增加任务描述

    2.2 填写源码信息

    2.3 构建触发器(可忽略)

    2.4 构建

    cd /root/.m2/repository/com/ruiyicloud/datacore
    rm -rf health-event-data-core/
    cd /root/.jenkins/workspace/health-event
    bash mvn_install.sh
    cp -f /root/.jenkins/workspace/health-event/target/health-event-1.0.0.jar /mnt/ruiyi-health-api/ruiyi-health-api-platform/modules/health-event/
    cd /mnt/ruiyi-health-api/ruiyi-health-api-platform/modules/health-event/
    if test $( pgrep -f health-event-1.0.0.jar | wc -l ) -eq 0 
    then 
    echo "进程不存在" 
    else 
    echo "存在进程" 
    ps -ef | grep health-event-1.0.0.jar  | grep -v "grep" | awk '{print $2}'| xargs kill -9
    fi 
    BUILD_ID=dontKillMe
    /usr/local/java/bin/java -server -Xmx512M -Xms512M -Xmn256M -XX:MaxPermSize=512M -XX:PermSize=256M -XX:AutoBoxCacheMax=20000 -Djava.security.egd=file:///dev/urandom -XX:+AlwaysPreTouch -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses -XX:+CMSClassUnloadingEnabled -XX:+ParallelRefProcEnabled -XX:+CMSScavengeBeforeRemark -Xloggc:/mnt/ruiyi-health-api/ruiyi-health-api-platform/modules/health-event/logs/gc.log -XX:+PrintGCDateStamps -XX:+PrintGCDetails -jar health-event-1.0.0.jar   > /dev/null 2>&1 &echo $! > tpid

    2.5 点击应用保存

    2.6 立即构建

    3. 效果展示

  • 相关阅读:
    int,long int,short int所占字节
    NSArray Sort
    Foundation Kit
    界面构建
    主题存放问题
    ObjectiveC中委托和协议
    IOS中编码转换方法(转)
    螺旋队列
    如何在多台机器上共享IOS证书
    Xcode 中使用Github
  • 原文地址:https://www.cnblogs.com/wgx519/p/13953773.html
Copyright © 2011-2022 走看看