zoukankan      html  css  js  c++  java
  • 5分钟搭建并使用 Jenkins

    目前市面上非常主流的部署架构Jenkins,我们来说一下他的安装流程:

    第一种方式:

    (1)下载 http://mirrors.jenkins.io/war-stable/latest/jenkins.war

    (2)java -jar jenkins.war --httpPort=8080

    (3)打开浏览器进入链接 http://localhost:8080

    (4)根据提示输入默认密码,安装相关的插件

    第二种方式(yum安装):

    [root@localhost ~]# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
    [root@localhost ~]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
    [root@localhost ~]# yum install jenkins
    # WAR包
    /usr/lib/jenkins/jenkins.war
    # 配置文件, 修改用户为:root
    /etc/sysconfig/jenkins
    # 默认的JENKINS_HOME目录
    /var/lib/jenkins/
    # Jenkins日志文件
    /var/log/jenkins/jenkins.log
    # 添加服务
    [root@localhost ~]# service jenkins start
    # 启动测试
    [root@localhost ~]# systemctl start jenkins
    Starting jenkins (via systemctl): [ 确定 ]
    # 重启 jenkins
    [root@localhost ~]# systemctl restart jenkins

    实操:

    (1)新建job

    (2)Source Code Management

    配置git仓库,这一步的操作主要是为了拉取代码

    (3)Build

    Maven Version: maven3

    Goals:clean install -Dmaven.test.skip=true

    (4)Execute Shell

    编译后执行的脚本。

  • 相关阅读:
    python3.x 基础五:模块
    python3.x 基础四:目录获取及目录规范
    python3.x 基础四:json与pickple
    python3.x 基础四:生成器与迭代器
    python3.x 基础三:装饰器
    python3.x 基础三:函数
    [leetcode]Anagrams
    [leetcode]Text Justification
    [leetcode]Single Number
    [leetcode]Longest Palindromic Substring
  • 原文地址:https://www.cnblogs.com/pzyin/p/13528796.html
Copyright © 2011-2022 走看看