Tuesday, January 3, 2023

End to End Automation of Java web App Using jenkins, github,sonaqube,Maven,Tomcat,Artifactory,Slack

  

End to End Automation of Java web App Using jenkins, github,sonaqube,Maven,Tomcat,Artifactory,Slack

 Tools Used:

  • Github— Source Code Management
  • Maven — Build Tool
  • Jenkins — Continuous Integration (CI/CD)
  • Artifactory — Artifact Repository Manager
  • SonarQube — Code Quality and Code Analysis
  • Tomcat — Application Server(Web container)



What is the Requirement? - Setup MyDevopsApp Java Project using Maven in github and Automate end to end Builds, Code quality checks, Deployments and Collaboration using Jenkins and other Devops tools we have used so far. Yo can create a new set of instances but for cost savings you can use the ones you have


Lab Exercise Steps:
1. Also, create a repo called MyAutomationRepo in github. (lab exercise # 5)
2. Create a Java project called MyDevopsApp (instead of MyWebApp which we did before (lab exercise #5) using Maven.
3. Set the above project in github(lab exercise #5)
4. Set up a free style job called MyDevopsFreeStyleJob (use webhooks,lab exercise #6, lab exercise # 8) in Jenkins and automate builds, deployments to Tomcat server (lab exercise #6). Also integrate with SonarQube to see the code quality report(lab exercise #10). Finally Jenkins should deploy to Tomcat immediately if there is a code change(lab exercise #7lab exercise 8). Also jenkins should upload WAR into Artifactory as well. (lab exercise # 17lab exercise 18). And send notifications to Slack(lab exercise # 19)
5 Finally show the below output in Tomcat by modifying index.jsp (lab exercise #6) in your java project. 
       Congrats I am now a Devops Engineer I Can Migrate App to cloud using Github,Jenkins,Maven and Tomcat!!!
6. SonarQube dashboard should be viewed in Sonarqube.
7. Artifactory should show uploaded artifacts as well.
8. Slack should show the message coming from Jenkins for every build success/failure.

Tips:

You all know the maven command to create a Java project using Maven and where you to change the word MyWebApp to MyDevopsApp.
mvn archetype:generate -DgroupId=com.mkyong -DartifactId=MyWebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

No comments:

Post a Comment

Jenkins Scripted Pipeline - Create Jenkins Pipeline for Automating Builds, Code quality checks, Deployments to Tomcat - How to build, deploy WARs using Jenkins Pipeline - Build pipelines integrate with github, Sonarqube, Slack, JaCoCo, Nexus, Tomcat

  Jenkins Scripted Pipeline - Create Jenkins Pipeline for Automating Builds, Code quality checks, Deployments to Tomcat - How to build, depl...