Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Sonarjenkins ajip


Published on

  • Be the first to comment

  • Be the first to like this

Sonarjenkins ajip

  1. 1. Sonar Jenkins HandsOnMak Bhatamrekar Java Concept Pros
  2. 2. Agenda• Amazon EC2 & Cloud• Jenkins• Sonar• Tomcat Integration• Recap
  3. 3. EC2 Launch Steps
  4. 4. EC2 Launch Steps1. Signup For EC2 Signup for Console Select Launch Instance4. Select Image5. Create / Select KeyPair6. Create / Select Security Group7. Launch
  5. 5. AWS Console - Select Instance (Need to Register on this URL First to Use It)
  6. 6. Download KP and Click Continue
  7. 7. Create Security Group
  8. 8. 1) From the menu option “Conversions”, select“Import key”2) In the dialog, locate PEM file and “Open” it.3) Change the comment from „imported-openssh-key” to a something more descriptive4) Optional: Enter a passphrase.5) Create PPK file by clicking on “Save private key”
  9. 9. • Open Putty• Add the “ppk key” in Connections->SSH->AuthSection• Session->Enter (Host0Name) / IP Address• Login in as ec2-user
  10. 10. Sonar Jenkins SVN Instance Description credentialsroot user -> ec2-user ec2-user is the root user name Use ppk key:22 Login using SSH Client like Putty. Use PEM Key:80 Apache Server Test Page:80/svnmanager:80/svn/svnrepoSVN Server admin/p@$$w0rd:8080/sonar Sonar on Tomcat Server admin/admin:8181/spring-mvc-showcase/:8080 Jenkins Server Nocredentials:3306 MySQL Server, use MySQL Client /SSH Clientroot / tiger:465 Gmail port
  11. 11. What Is Jenkins• Continuous Integration- Ant , Maven Builds- Custom Builds• Built In Java, Jenkins.war• Plugin Echo System• Strong Integration withOther Tools like– GIRA --SONAR– Gerrit --Chat• Used By – Like Netflix,LinkedIn,GitHub etc
  12. 12. Some Jenkins Plugins To HavePlugin UsageSCM Plugins Source Control Plugins for SVN, P4 etcJobHistory Plugin History of Changes in ConfigurationDiskUsage Plugin Visualize the space , workspace, archivedbuilds takes.BuildTimeOut Plugin Kill the Build after TimeOutParameterized Trigger Plugin To Pass parametersEmail –Ext Plugin To Format your Emails• Use Plugins On Need Basis (Total 375 Plugins)•
  13. 13. Jenkins Tips• Do no have Monolithic Builds– Use Master- Slave to distribute the jobs– Split Jobs logically• Jenkins Releases are Weekly• Join Jenkins Community
  14. 14. • Coding Standards• Potential Bugs• Documentation / Comments• Duplicated Code• Complexity• Test Coverage• Design and Architecture – minimizedependencies
  15. 15. • Squid (Core Analyzer)– RFC (Response For Class)– LCOM4 (Lack Of Cohesion Methods)– DIT (Depth Of Inherentence Tree)– NOC – Number Of Children• CheckStyle (Adheres to Coding Standards)
  16. 16. • PMD (Project Mess Detector)– Possible Bugs– Dead Code– SubOptimial Code– Complex Expressions• FindBugs (Static Analysis)– Malicious Code / Vulnerabilities
  17. 17. • Cobertura & Clover– Based on Jcoverage java lib– %tage of Code Accessed by tests– Calculates Cyclomatic Complexity• FindBugs (Static Analysis)– Malicious Code / Vulnerabilities
  18. 18. Introducing Sonar
  19. 19. • Coding Standards• Potential Bugs• Documentation• Duplicated Code• Complexity• Test Coverage• Design & Arch –– Min Depend, Cohesion, Loose Coupling
  20. 20. • SQUID (Core Analyser)– LCOM4 – Lack of Cohesion Methods– DIT – Dependency Of Inheritence Tree– NOC – No of Children• CheckStyle– Coding Standards– Duplication,– Memory Outage
  21. 21. • PMD (Project Mess Detector)– Possible Bugs– Dead Code– Complex Expressions• Find Bugs– Static Analysis , Trace Bugs• Cobertura & Clover– Code Coverage
  22. 22. • OpenSource• Quality Management Program.• More Than 600 Code Rules have beenIntegrated• Helps Detect Minor to Critical Defects• Drills Code Top to BottomWatch the Quality Of Code Over Time
  23. 23. • Eclipse Plugin• PDF Reports• Maven Ready• Extensible Plugin System
  24. 24. References••••
  25. 25. Sonar Jenkins HandsOnMak Bhatamrekargithub : : mak-bkarurl : www.careerinjava.com Java Concept Pros