当前位置:网站首页>利用Jenkins的持续集成
利用Jenkins的持续集成
2022-08-05 07:11:00 【爻`】
下载安装jenkins
jenkins官网下载:https://www.jenkins.io/download/
下载jenkins.war,放到tomcat的webapps目录下,启动tomacat即可
访问jenkins,访问地址:http://localhost:8080/jenkins
找到初始的管理员密码:密码位置C:\Users\pc.jenkins\secrets\initialAdminPassword

选择插件进行安装


创建管理员账号

实例配置,选暂不配置

安装完成

jenkins的配置及使用
下载插件及配置插件
Manage Plugins :下载插件位置
Global Tool Configuration:配置插件的位置(其中如果环境变量中已存在则会自动带出,不存在需要手动配置;不要勾选自动安装)

新建项目


配置项目
General中添加描述:
源码管理中,填写项目的git地址,添加个人验证信息并选择(其中私钥位置:C:\Users\pc.ssh\id_rsa)

构建触发器
常用周期性构建语法:
格式:
分 小时 日 月 星期
0-59 0-23 1-31 1-12 0-7
表达式含义:
第一位:表示分钟,取值范围 0~59
第二位:表示小时,取值范围 0~23
第三位:表示每月第几天,取值范围 1~31
第四位:表示第几月,取值范围1~12
第五位:表示每周第几天,取值范围0~7,0和7代表的都是周日
表达式中允许使用以下特殊字符:
星号(*):代表所有可能的值,如【月】字段是星号,则表示每月都执行操作
逗号(,):代表指定一个列表范围,如【日】字段是"1,2,5",则表示1日、2日、5日执行操作
中杠(-):代表可以用整数之间一个范围,如【时】字段是"2-6",则表示"2,3,4,5,6"小时执行操作
正斜线(/):代表时间的间隔频率,如【时】字段是"0-23/2",则表示每两小时执行一次,正斜线和星号可以一起使用,例如*/10,如在【时】字段,则表示每十分钟执行一次
H: 代表分散负载,如【分】字段是H,表达式H 7 * * * ,则表示7点-8点之间内执行操作,根据自身负载情况选择运行
eg:
每15分钟构建一次:H/15 * * * *或*/15 * * * *
每天8点构建一次:08 * * *
每天8点~17点,两小时构建一次:08-17/2 * * *
周一到周五,8点~17点,两小时构建一次:08-17/2 * * 1-5
每月1号、15号各构建一次,除12月:H H 1,15 1-11 *H/2 * * * *:每2分钟检查一次源码变化02 * * *:每天2:00 build一次源码

选择构建环境,并添加构建步骤和构建后的操作(被测项目构建之后可运行测试项目)





边栏推荐
- RK3568 environment installation
- MySQL: basic part
- 本地能ping通虚拟机,虚拟机ping不通本地
- cmake 学习使用笔记(三)
- Redis
- Task flow scheduling tool AirFlow,, 220804,,
- Shiny04---Application of DT and progress bar in shiny
- Promise (3) async/await
- An IP conflict is reported after installing the software on a dedicated computer terminal
- 专用机终端安装软件后报IP冲突
猜你喜欢

FPGA parsing B code----serial 4

Put Cloudflare on the website (take Tencent Cloud as an example)

After working for 3 years, I recalled the comparison between the past and the present when I first started, and joked about my testing career

数据库——概述

Redis

二叉树进阶复习1

U++ UE4官方文档课后作业

TRACE32——加载符号表信息用于调试

In the anaconda Promat interface, import torch is passed, and the error is reported in the jupyter notebook (only provide ideas and understanding!)

protobuf根据有关联的.proto文件进行编译
随机推荐
JS实现从照片中裁切自已的肖像
mysql使用in函数的一个小问题
2022.7.29好题选讲(计数专题)
How to avoid online memory leaks
C-Eighty seven(背包+bitset)
props 后面的数据流是什么?
在anaconda Promat界面import torch通过,在jupyter notebook中报错的问题(仅提供思路理解!)
DNSlog外带数据注入
标准C语言15
RNote108---Display the running progress of the R program
访问被拒绝:“microsoft.web.ui.webcontrols”的解决办法
HR:这样的简历我只看了5秒就扔了,软件测试简历模板想要的进。
七夕?编程?
3555. 二叉树
Technical Analysis Mode (8) Double Top and Bottom
Technical Analysis Patterns (11) How to Trade Head and Shoulders Patterns
【 LeetCode 】 235. A binary search tree in recent common ancestor
TRACE32——通用寄存器查看与修改
线程池的创建及参数设置详解
开启防火墙iptable规则后,系统网络变慢