jenkis基本设置

 

新建任务

 

 

 

 

设置JenkinsURL地址

      在系统设置里

 

 

 

 

 

 

 

 

 

设置工作路径

点击 General---->高级

 

 

 

 

 

添加gitlab源码管理(安装gitlab插件)

a.添加git地址

 

 

 

 

注意 Repository URL ssh://git@192.168.111.133/hyc/untitled.git  

b.添加git秘钥

点击 add ----> Jenkins

 

 

 添加工作环境

 

 

 

 

利用GitLab webhook来实现触发Jenkins自动操作

 

 

 

 

注意:次任务名称不能为中文

构建脚本

 

 

 

 

 

 

添加钉钉通知

1、钉钉建群,添加机器人,获得access_token

帖子 https://blog.csdn.net/workdsz/article/details/77531802

2Jenkins下载插件

主页面-系统管理-管理插件-可选插件 搜Dingding JSON Pusher Plugin

3、其他项目配置完成后,添加构建后操作,选择Dingding JSON Pusher

4、钉钉access token填入access_token,不是整个路径只是路径后的access_token的值,比如

https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxx,要填入的是xxxxxxxx

 

 

posted @ 2023-02-08 09:16  勇闯天涯hyhc  阅读(61)  评论(0)    收藏  举报