长治网站建设龙采科技技术支持,美橙建站五站合一软件,ps手机网站页面设计,小程序制作合同范本配置环境 虚拟机建议4G起步 192.168.58.199 192.168.58.200 部署Jenkins
部署Jenkins参考这篇文章#xff1a;Jenkins安装部署_connecting to pkg.jenkins.io (pkg.jenkins.io)|151.-CSDN博客 安装完毕之后根据下图操作 选择git#xff0c;添加git仓库克隆url#xff0c;选…配置环境 虚拟机建议4G起步 192.168.58.199 192.168.58.200 部署Jenkins
部署Jenkins参考这篇文章Jenkins安装部署_connecting to pkg.jenkins.io (pkg.jenkins.io)|151.-CSDN博客 安装完毕之后根据下图操作 选择git添加git仓库克隆url选择私钥 Gitlab上的操作
选择新建项目
创建空白项目 新建项目完成之后添加SSH连接公钥
分别在199主机和200主机新建公私钥 [rootpro ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Passphrases do not match. Try again.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:W8Vj9eu9Vu6uKcZFisN17calbSjZMXSuuLgCOek1RY rootpro
The keys randomart image is:
---[RSA 2048]----
| . |
| . .o. |
| . .|
| o.. |
| SE.o B |
| .o * |
| . . * o|
| B .o.o|
| . o . *o.|
----[SHA256]-----将新建的公私钥添加到Gitlab上 选择刚刚新建的项目test-jenins3,复制克隆地址 返回Jenkins操作 将复制的地址粘到此处 注意在Jenkins上要添加解密私钥添加方法自己研究
让Jenkins每分钟检查一次gitlab有没有更新 添加执行shell命令点击保存 点击构建 点击控制台输出
整合完毕查看输出结果