jenkins持续集成

本文详细介绍Jenkins的部署步骤,包括配置端口号、更新中心地址、管理员用户创建及重启,以及如何使用Jenkins Pipeline进行自动化流程管理。此外,还探讨了Jenkins与SVN集成、执行权限修改、远程发布、Docker打包、SSH发布、环境变量设置等高级功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.部署

wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --no-check-certificate

wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

2.vi /etc/sysconfig/jenkins

修改端口号为10080

3./var/lib/jenkins/hudson.model.UpdateCenter.xml

修改地址为:http://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json

4.创建管理员用户之后,重新启动jenkins

service jenkins restart

5.使用-pipeline

https://www.cnblogs.com/forever521Lee/p/9593855.html

6.jenkins+svn

https://www.cnblogs.com/helenMemery/p/6646978.html

7.修改jenkins执行权限

https://blog.csdn.net/lanfan_11/article/details/50772291

8.远程发布

https://www.cnblogs.com/Dev0ps/p/9045762.html

9.监控文件夹数据变化

https://blog.csdn.net/HeatDeath/article/details/80438268

10.jenkins-docker打包

http://blog.51cto.com/lizhenliang/2159817

https://blog.csdn.net/skyform_/article/details/79152707

https://blog.csdn.net/axela30w/article/details/82183853

删除镜像

https://blog.csdn.net/z497896143/article/details/81705410

11.docker run指定 springboot 参数

https://segmentfault.com/a/1190000011367595

https://blog.csdn.net/drbinzhao/article/details/78654245?utm_source=blogxgwz2(所有命令及值类型)

查看docker实时日志

docker logs --tail="10" mytest

12.jenkins+nodejs+gulp

https://stackoverflow.com/questions/53245899/foundation-for-emails-cant-create-new-project-with-npm-error

13.jenkins 高级函数

https://blog.csdn.net/diantun00/article/details/81075007

14.ssh publish

sourcefile指的是workspace路径下的文件

文件夹:  files/**

文件:    files/file或files/*

15.nginx镜像

https://blog.csdn.net/qq_26641781/article/details/80883192

keepalived的docker镜像

https://imkira.com/a17.html

http://blog.51cto.com/433266/2299158(yum包安装)

yum install -y libssl-dev openssl libpopt-dev

yum install -y keepalived

cp /usr/share/doc/keepalived-1.3.5/samples/keepalived.conf.sample /etc/keepalived/keepalived.conf

 

16.生产环境、测试环境 用户权限分配设置

https://www.jianshu.com/p/edace37a0f58

环境变量

https://www.cnblogs.com/junneyang/p/5239480.html

https://issues.jenkins-ci.org/browse/JENKINS-38483( properties file bug)

https://www.luochunhui.com/(参考)

https://www.jianshu.com/p/7a852d58d9a9  (when条件语句)

添加系统环境变量

https://www.keypressure.com/blog/jenkins-system-properties/

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

梦里仙

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值