• 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的插件依赖:

  • 相关阅读:
    Linux网络基础配置
    UVA 116 Unidirectional TSP(dp + 数塔问题)
    修改Hosts文件
    倒排索引
    可以把阿里云上面的一些介绍和视频都看看
    练练脑,继续过Hard题目
    explicit的用法
    auto_ptr的使用和注意
    我写的快排程序
    快速排序、查第k大
  • 原文地址:https://www.cnblogs.com/john4415/p/11433541.html
Copyright © 2020-2023  润新知