gpt4 book ai didi

Spring Boot和Continuous Delivery简单管道

转载 作者:行者123 更新时间:2023-12-04 03:56:48 27 4
gpt4 key购买 nike

我找不到任何示例或文章,当我们使用Spring Boot + Jenkins时,连续交付管道的外观如何。

在Java EE中,我通常这样做:

  • 将更改推送到存储库
  • Jenkins每5分钟检查一次更改
  • 如果发生更改,Jenkins会拉出源代码并运行maven build
  • 使用wildfly Maven插件
  • 我在服务器
  • 上运行重新部署

    通常,我想知道使用Spring Boot时最后要做什么。应用程序打包到单个JAR中,并在单独的进程中运行,因此在Spring Boot中实际上没有诸如重新部署之类的东西。我是否必须先编写一些脚本来杀死旧进程,然后运行新工件?或者,也许像“spring boot cli”之类的东西可以管理所有正在运行的spring boot应用程序?

    最佳答案

    您需要杀死旧进程并将新进程作为服务运行。
    此处Spring Boot application as a Service对此进行了很好的解释。

    有一个不错的ssh插件供我们使用的jenkins:https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin

  • 将jar复制到服务器
  • 停止旧服务
  • 运行新服务

  • 编辑:添加了用于将Spring Boot作为服务运行的Spring Boot引用- http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html @Vaelyr

    关于Spring Boot和Continuous Delivery简单管道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40928843/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com