Running spring-boot with maven using Jenkins

Asked 2 years ago, Updated 2 years ago, 71 views

Hi, everyone. Currently, we are doing this and that to build a distribution environment using Jenkins.

I am working in a Jenkins(latest) v1.651.1 environment, and the repository requires Bitbucket. Of course, it's a private repository.

In the case of Bitbucket, we tried to authenticate SSH or Outh during the authentication process, but all of them failed, so we are currently using the authentication method using ID and password. If you can advise on this, please.

First of all, the challenges we face today are as follows:

Bitbucket using Jenkins Since the source code distribution from the private repository, we have built it with the following options:

[Invoke top-level Maven targets]
Maven version: maven3
Goals: spring-boot:run

As shown above, we gave the Goals option and built successfully and ran Tomcat embedded in Spring-boot, but the problem is that Jenkins completes the build and does not end the program, but continues to bite.

Jenkins has been maintained while the console was output in the In progress... state since the internal Tomcat of Spring-boot has already been fully uploaded. How do I solve this problem?

jenkins spring-boot maven

2022-09-22 21:43

1 Answers

Workaround:

echo "mvn spring-boot:run" | at now + 1 minutes

.

Looking at the contents below, Jenkins says that it is difficult to handle the child process created by the build.

https://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build

So they use the above method a lot as a simple solution.

.

Note: http://stackoverflow.com/questions/28500066/how-to-deploy-springboot-maven-application-with-jenkins


2022-09-22 21:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.