How to start a Java spring boot application using Jenkins X?
What is JenkinsX?
Jenkins X is the new cloud flavor of Jenkins that promises to automate CI/CD and DevOps practices.
What are the differences between Jenkins and JenkinsX ?
The Jenkins X focuses on automating CI/CD for the cloud using open-source tools like Kubernetes, Helm, Git, Nexus/Artifactory, etc. Jenkins is the source automation tool for reliably build, test, and deploy of software.
Java has different versions and we need to check the available build-pack for Java by typing the following command. In our case, it was the following build packs:
$ jx create quickstart // Output rust-http scala-akka-http-quickstart spring-boot-http-gradle spring-boot-rest-prometheus spring-boot-rest-prometheus-java11 spring-boot-watch-pipeline-activity
Steps to quickstart reactjs app JenkinsX
If we just try the following command then it will set up everything for us using the spring-boot-rest-prometheus-java11 build pack.
$ jx create quickstart -f spring-boot-rest-prometheus-java11 -p transformer // It will ask these questions Using Git provider github at https://github.com ? Do you wish to use dev-jenkins as the Git user name? Yes ? Which organisation do you want to use? Dev-Media ? Enter the new repository name: subscription ? Would you like to initialise git now? Yes ? Commit message: Initial import
Once the application is set up properly we can check the log by changing the namespace and log command like below:
$ jx ns $ jx get build logs We can check the kubernetes pods using this command: $ kubectl get pods