1. 介绍
官方解释如下
Jenkins is a self-contained, open source automation server which can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software.
Jenkins can be installed through native system packages, Docker, or even run standalone by any machine with a Java Runtime Environment (JRE) installed.
主要功能是, 串联构建 / 测试 / 部署等过程中的任务, 并实现自动化执行
如果你用过iphone的快捷命令, 大概可以很容易理解jenkins的工作: 把一系列任务组织起来, 按顺序自动执行
2. 下载安装
下载链接:https://get.jenkins.io/war-stable/2.319.1/jenkins.war
启动依赖jdk
java -jar jenkins.war
访问http://<server ip>:8080
3. 初始化
3.1. 激活jenkins
第一次启动jenkins, 会生成随机密码用来激活jenkins
*************************************************************
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
f99ba8cb0b1040cd8358e64273a8c751
This may also be found at: /root/.jenkins/secrets/initialAdminPassword
*************************************************************
输入上述随机密码: f99ba8cb0b1040cd8358e64273a8c751
3.2. 安装插件
插件来用丰富jenkins的功能, 根据需要下载
- 编译打包工具选择: git, maven, ant等
- 跨服务器执行工具: ssh build agents
- 邮件通知工具