Spring Simple pipeline loading and continuous delivery

I cannot find any example or article on how a continuous delivery pipeline might look when we use Spring Boot + Jenkins.

In Java EE, I usually do it like this:

  • Push changes to repository
  • Jenkins checks for changes every 5 minutes.
  • If changes have occurred, Jenkins pulled out the sources and launched maven build
  • using the wildfly maven plugin Run redeploy on the server

In general, I wonder what to do in the last paragraph when I use Spring Boot. The application is packaged in a single JAR and runs in a separate process, so there is no such thing as redistribution in Spring Boot. Do I have to write some script to kill the old process first and then start a new artifact? Or could it be something like "spring boot cli" where I could manage all of the downloaded Spring applications?

+5
source share
1 answer

You need to kill the old process and start the new process as a service. Everything is very well explained here. Spring Downloading the application as a service .

There is a good ssh plugin for jenkins that we use: https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin

  • Copy the jar to the server
  • Stop old service
  • Start new service

EDIT: added link for Spring boot to start Spring boot as a service - http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html @Vaelyr

+3
source

Source: https://habr.com/ru/post/1260694/


All Articles