zoukankan      html  css  js  c++  java
  • java,jenkins

    以前玩的是hudson ,现在玩的是jenkins.以前用的是Tomcat,现在不知道他们怎么不用。。。

    1,装个Jenkins镜像。

    2.配置项目:

    先取个名字:exchange

    配个svn:

    构建触发器

    ;;

    构建前有个脚本:做些准备工作:.停服务。备份

    [mgdb@mgdb1 statistics]$ cat b.sh
    #!/bin/bash
    cd /mgdb/mongodb/test/statistics
    rm -rf /mgdb/mongodb/test/statistics/statistics-1.0.jar.bak
    mv statistics-1.0.jar statistics-1.0.jar.bak
    ps -ef|grep statistics-1.0.jar|grep -v grep|awk -F ' ' '{print $2}'|xargs kill -9
    ls
    [mgdb@mgdb1 statistics]$

    最后:

    这里也有个脚本:

    [mgdb@mgdb1 statistics]$ cat a.sh
    cd /mgdb/mongodb/test/statistics/
    nohup java -jar statistics-1.0.jar & > nohup1.out > /dev/null
    a=10
    while((a>0))
    do
    sleep 20
    grep "Tomcat started on port(s)" nohup.out
    a=`echo $?`
    b=`grep "Tomcat started on port(s)" nohup.out`
    echo $b
    done

     主要是处理日志超时,所以加了个while判断!!!

    然后:交付开发使用,so easy!

  • 相关阅读:
    蘑菇街
    康拓展开
    CSS学习笔记
    专业名词
    专业名字
    01背包问题
    将bbr功能合入到centos7.3
    How to Identify User&Password of DataBase safely in SQL statement?
    tips for private constructor
    all Key Word of C#
  • 原文地址:https://www.cnblogs.com/Jt00/p/7080730.html
Copyright © 2011-2022 走看看