java Jenkins在Jenkins运行时没有运行。战争没有爆发
我正在尝试为我正在从事的selenium/maven项目自动安排Jenkins的工作。一切都正常运行,自动调度只有在。jar文件正在运行(使用命令:java -jar jenkins.war --httpPort=8089
)。但一旦我退出命令提示符和Jenkins服务器,它就根本不会运行。我的假设是,无论连接与否,无论计算机是否登录,它都应该运行
在我看来,当詹金斯夫妇去世时,詹金斯的自动计程系统似乎不工作了。war文件未启动并运行
我错过什么了吗
# 1 楼答案
如果未执行
.war
文件,则整个jenkins
进程将不会运行。问题是你如何管理詹金斯这里有extensive documentation如何运行它。然而,我最终在一个支持
systemd
的操作系统(linux)上运行,它有一个system.d
服务文件:/usr/lib/systemd/system/jenkins.service
:与:
/etc/default/jenkins
并通过Apache HTTP服务器,通过ProxyPath发布:
使用Apache HTTP虚拟主机配置:
相同的配置设置,但通过NGINX:Jenkins reverse-proxy configuration nginx
通过这种方式,您可以管理jenkins服务器(启动/停止)和TLS(SSL)通信:
如果你通过Docker运行Jenkins,你不需要在Jenkins前面公开另一个Web服务器(例如Apache/NGINX),你不会公开Jenkins Docker容器,但你前面可能有一个Kubernetes/(a)LB。不建议公开揭露詹金斯
Web服务器为您提供了在Jenkins面前使用缓存或CDN的灵活性,尤其是当您使用发布工件功能时