配置jenkins用户(这样才能在shell下执行 docker 命令)vim /etc/sudoersroot ALL=(ALL:ALL) ALLjenkins ALL=(ALL:ALL) A
配置jenkins用户(这样才能在shell下执行 docker 命令)
vim /etc/sudoers
root ALL=(ALL:ALL) ALLjenkins ALL=(ALL:ALL) ALL
- usermod -G root jenkins - 记得要重启重启
Poll SCM设置
*/1 * * * *
(我也不知道是什么东西,但是这个是一分钟执行一次检查git)
.Net 项目在linux下编译
- 还原Nuget包,要用到mono
- mono ../.nuget/NuGet.exe restore ETL/ETL.sln
- 编译用xbuild
- 位置在 /usr/bin/xbuild
- Release版本增加参数:/p:Configuration=Release
- 还原Nuget包,要用到mono
Jenkins git报错
- 注意全局配置一下git路径(Windows下尤其注意!)
其他什么我也想不到了,反正配置勉强通过了。。。
Docker相关内容基本都是脚本+Dockerfile
Dockerfile可以偷懒直接放到项目中去,这样编译执行命令什么的,都可以直接使用,免得切换目录。