当前位置:网站首页>Yunyuanyuan (IX) | Devops chapter Jenkins installation and actual combat
Yunyuanyuan (IX) | Devops chapter Jenkins installation and actual combat
2022-07-22 02:27:00 【InfoQ】
One 、Jenkins install
1、 background
- Jenkins Is based on Java A continuous integration tool for development .
- Jenkins As a continuous integration tool , Continuous integration is its core function , On the basis of core functions, it can be extended to realize powerful CD function .
2、 characteristic
- Free open source
- Easy to install ( Basically all CI The simplest installation and configuration in the tool )
- Multi platform support (windows/linux/macos)
- Master slave distributed architecture
- Provide web Visual configuration management page
- Simple installation and configuration
- Plugins are rich in resources
3、 Official website installation document address

4、 Start installation
- jenkinsci/jenkins It's not blueocean The plug-in , You have to pretend
- jenkinsci/blueocean: Yes
docker run \
-u root \
-d \
-p 8080:8080 \
-p 50000:50000 \
-v jenkins-data:/var/jenkins_home \
-v /etc/localtime:/etc/localtime:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
--restart=always \
jenkinsci/blueocean
5、 Installing

6、 installation is complete

7、 Page access

8、 Find the password with the following command





9、 Install the default recommended plug-ins , And configure the user






Two 、
Jenkins actual combat
1、 Prepare one git Project to test
- idea establish Spring Boot project

- VCS - establish git Warehouse

- gitee Create a warehouse , Upload locally to the warehouse

- idea Submit content to gitee

- Develop the basic functions of the project , And create a... In the project jenkinsfile file

- Create a file called devops-java-demo Assembly line project , Use the project's own pipeline



- Every assembly line project , Occupy a folder location
- BUILD_NUMBER=5; How many times are you building
- WORKSPACE_TMP( Temporary directory )=/var/jenkins_home/workspace/[email protected]
// Write pipeline script ( declarative 、 Scripted )
pipeline{
// All of the CICD Processes need to be defined here
// Any agent available can execute
agent any
// Define some environmental information
// Define the processing flow of the pipeline
stages {
// All stages of the pipeline
// 1、 compile
stage(' compile '){
steps{
// Everything to do
echo " compile ..."
}
}
// 2、 test
stage(' test '){
steps{
// Everything to do
echo " test ..."
}
}
// 3、 pack
stage(' pack '){
steps{
// Everything to do
echo " pack ..."
}
}
// 4、 Deploy
stage(' Deploy '){
steps{
// Everything to do
echo " Deploy ..."
}
}
}

2、
Remote build triggers












边栏推荐
- MySQL installed in MAC M1, enable binlog
- 交换机DHCP服务器配置方法(命令行版)
- How the computer accesses the Internet (I) message generation DNS
- 反沙箱方法
- [Development Tutorial 4] crazy shell · humanoid hip-hop robot PC upper computer online debugging
- DHCP protocol
- Introduction to web security TCP stress testing and defense
- 云原生(九) | Devops篇之Jenkins安装与实战
- 08. Merge sort and quick sort
- (leisure) leetcode_ 7. Integer inversion
猜你喜欢
电脑是怎样上网的 (二) 从网线到网络设备
Sentinel理论知识与介绍
Creation of configuration files in Nacos configuration center and reading of Nacos configuration center by microservices
【GoogleTest】GoogleTest单元测试(1)快速上手
MySQL installed in MAC M1, enable binlog
Gateway路由服务的创建
VLAN与三层交换机
After 2 days of obsolescence, Microsoft gave up "banning" commercial open source!
SkyWalking集成日志框架、告警、高可用集群搭建
Research and practice of field data model based on 3D GIS
随机推荐
Skywalking integrated logging framework, alarm and high availability cluster construction
ByteDance confirmation will be self-developed chip: for internal use only; Musk: I have uploaded my brain to the cloud; Go language product head leaves | geek headlines
【H3C设备组网配置】
VLAN与三层交换机
[自然语言处理] 预训练词向量百度云下载 [Word2Vec, Glove, FastText]
【开发教程4】疯壳·人形街舞机器人-PC 上位机在线调试
weirdo A company's interview questions asked about toilet habits, eating time, sleeping time, etc
【sklearn】数据集拆分 sklearn.moduel_selection.train_test_split
Solve the error omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized
On Newton iteration
分布式事务之二阶段提交、AT模式、TCC模式
win10安装nvm
学习STM32,从HAL库的框架设计开始
童年的回忆小游戏来了——贪吃蛇,快来自己动手写一个属于自己的小游戏吧
Introduction to web security TCP stress testing and defense
静态路由原理与配置
[Development Tutorial 4] crazy shell · humanoid hip-hop robot PC upper computer online debugging
大型【项目管理】的实战
【GoogleTest】GoogleTest单元测试(1)快速上手
R语言使用fmsb包可视化雷达图(radar chart、蜘蛛图spider plot)、独立显示多个数据对象的雷达图、添加平均水平灰色区域、每个雷达图都和平均水平进行对比