zoukankan      html  css  js  c++  java
  • jenkins部署的零碎知识

    环境要求

    1)版本控制子系统(SVN):SVN服务器、项目对应版本库、版本库中钩子程序(提交代码后,触发Jenkins自动打包并部署到应用服务器)
    (2)持续集成子系统(存在Jenkins的服务器):JDK、Tomcat、 Maven
    (3)Jenkins:主体程序、SVN 插件、Maven 插件、Deploy to Web Container 插件
    (4)应用发布子系统(项目的运行环境):JDK、Tomcat

    Centos 系统安装SVN
    同样的,对于Centos 或者Linux系统,直接输入命令
    $ yum install svn
    在Centos 6.5系统安装过程中,出现过这样的 issue:
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Existing lock /var/run/yum.pid: another copy is running as pid 2585.
    Another app is currently holding the yum lock; waiting for it to exit…
    The other application is: PackageKit
    Memory : 25 M RSS (334 MB VSZ)
    Started: Fri Feb 17 23:19:23 2017 - 02:48 ago
    解决方法:
    直接输入 rm –f /var/run/yum.pid
    或者关掉进程:/etc/init.d/yum-updatesd stop
    当使用 rm -rf /var/run/yum.pid 后,上述问题解决,但是出现 这样的错误
    ERROR 6 - “Couldn’t resolve host ‘ftp.isu.edu.tw‘“Trying other mirror.
    http://ftp.stu.edu.tw/Linux/CentOS/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - “Couldn’t resolve host ‘ftp.stu.edu.tw‘“Trying other mirror.
    原因是因为DNS出错,通过centos系统,进入到
    cd/etccd/etc vi resolv.conf

    /etc/resolv.conf
    添加一个nameserver 8.8.8.8完成或者根据当前网络添加nameserver 61.139.2.69(成都电信)
    3.上述问题解决后,再使用命令:yum install svn
    4. 安装完成后,查询是否安装成功,使用命令 :svn –version
    接下来就可以使用 svn update 等svn相关的命令了。

    Jenkins 如何配置SVN
    打开jenkins web端

     

    点击系统管理,进入该页面

    搜索 SVN Plugin,搜索后,进行安装。

    就这样SVN plugin安装成功后,可以使用SVN Plugin了。
    安装成功后,可以在jenkins web端查看到:
    输入SVN的URL,如图所示:


    就这样就可以从svn上提取code 了。

    安装maven的插件依赖:

  • 相关阅读:
    219. Contains Duplicate II
    189. Rotate Array
    169. Majority Element
    122. Best Time to Buy and Sell Stock II
    121. Best Time to Buy and Sell Stock
    119. Pascal's Triangle II
    118. Pascal's Triangle
    88. Merge Sorted Array
    53. Maximum Subarray
    CodeForces 359D Pair of Numbers (暴力)
  • 原文地址:https://www.cnblogs.com/john4415/p/11433541.html
Copyright © 2011-2022 走看看