Jenkins-在Docker上配置自动化部署(Jenkins+Gitlab)

Jenkins-在Docker上配置自动化部署(Jenkins+Gitlab)

 

环境 Centos7 上的 Docker 

gitlab部署:https://www.cnblogs.com/1285026182YUAN/p/15497625.html

jenkins部署: https://www.cnblogs.com/1285026182YUAN/p/17048745.html

 

gitlab 项目:http://192.168.91.128:8020/root/tdockercode.git

jenkins任务:http://192.168.91.128:10240/job/TDockerCode/

 

jenkins上配置

 

如连接不上gitlab ,注意关闭防火墙

 

 

 

 

 

 

 

 

 

 生成一个 secret token 写入 gitlab 中。

 

gitlab 上配置

 

 

 

 

 

gitlab中出现错误 Urlis blocked: Requests to the local network are not allowed

 
 

 

 

原因:

gitlab 10.6 版本以后为了安全,默认不允许向本地网络发送webhook请求

(既然是默认,也就是说还是可以修改的)

解决办法:

以管理员身份登录gitlab,进入管理面板

 

 

 

 

 

Jenkins 远程触发 403 No valid crumb was included in the request

在下面脚本命令行中输入
hudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION = true

 

 

 

引用: https://www.cnblogs.com/puzi0315/p/15550312.html 

 

posted @ 2023-01-13 14:24  无心々菜  阅读(117)  评论(0编辑  收藏  举报