作者:zj | 来源:互联网 | 2023-09-23 15:33
话不多,以版本 Jenkins 2.350为例,来创建一下新项目
![](https://img.php1.cn/3cd4a/1eebe/cd5/4283cd4bbba41b87.png)
首先需要登录Jenkins
比如:admin/123456
登录成功后找到新建item并点击![](https://img.php1.cn/3cd4a/1eebe/cd5/ed19db63ee478b98.png)
![](https://img.php1.cn/3cd4a/1eebe/cd5/70be2ca197098d98.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/b428d8f746fb8d47.webp)
如果需要定时去跑,可以配置一下
H H(9-18)/2 * * 1-5
![](https://img.php1.cn/3cd4a/1eebe/cd5/5287a7b3296ea13e.webp)
![](https://img.php1.cn/3cd4a/1e618/bdf/129913486c37ddf6.jpeg)
如果需要配置控制台的颜色如下
![](https://img.php1.cn/3cd4a/1eebe/cd5/bcafc120671304eb.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/99b88427bc9ce0dc.webp)
在每个需要使用的项目里面配置一下即可
![](https://img.php1.cn/3cd4a/1eebe/cd5/b386c433a16f5497.webp)
勾选上使用默认配置即可
如图我的安装在了D盘
![](https://img.php1.cn/3cd4a/189d8/b64/5b34b53b79a39fdd.jpeg)
构建里面,附上需要执行的命令即可,比如我的是ApiFox命令
![](https://img.php1.cn/3cd4a/1eebe/cd5/45a090220e38e09d.webp)
![](https://img.php1.cn/3cd4a/1e618/bdf/129913486c37ddf6.jpeg)
![](https://img.php1.cn/3cd4a/1eebe/cd5/02c379d60086f382.webp)
如果需要发送邮件则配置一下构建后操作,不需要则忽略
![](https://img.php1.cn/3cd4a/1eebe/cd5/67cc2e96eddffff8.png)
最后一步,应用即可
![](https://img.php1.cn/3cd4a/1eebe/cd5/45a090220e38e09d.webp)
创建好后如图
![](https://img.php1.cn/3cd4a/1eebe/cd5/bcafc120671304eb.webp)