You are previewing Jenkins Essentials.
O'Reilly logo
Jenkins Essentials

Book Description

Continuous Integration – setting up the stage for a DevOps culture

In Detail

In agile development practices, developers need to integrate their work frequently to fix bugs or to create a new feature or functionality. To integrate all work efficiently and verify it is an error-prone and time-consuming manual task. Jenkins is used specifically for continuous integration, helping to enforce the principles of agile development.

This book begins by tackling the installation of the necessary software dependencies and libraries you'll need to perform continuous integration for a Java application. From there, you'll integrate code repositories, applications, and build tools for the implementation of continuous integration. Finally, you'll explore the automated deployment of an application in Tomcat, along with details on managing and configuring Jenkins based on your requirements by using plugins.

What You Will Learn

  • Get to grips with the challenges faced by developer communities

  • Learn about continuous integration and how it helps in building various Java applications

  • Facilitate the installation and configuration of Jenkins

  • Install and configure code repositories and build tools

  • Explore the integration of Eclipse with code repositories

  • Manage the integration of Jenkins, code repositories, and build tools

  • Familiarize yourself with continuous integration for Java applications with unit test execution and static code analysis

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Jenkins Essentials
      1. Table of Contents
      2. Jenkins Essentials
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      8. 1. Exploring Jenkins
        1. Introduction to Jenkins and its features
          1. Features
        2. Installation of Jenkins on Windows and CentOS
          1. Installing Jenkins on Windows
          2. Installation of Jenkins on CentOS
          3. Installation of Jenkins as a web application
        3. A jump-start tour of the Jenkins dashboard
        4. How to change configuration settings in Jenkins
        5. What is the deployment pipeline?
        6. Self-test questions
        7. Summary
      9. 2. Installation and Configuration of Code Repository and Build Tools
        1. An overview of a build in Jenkins and its requirements
        2. Installing Java and configuring environment variables
          1. Configure environment variables
        3. Installing, configuring, and operating SVN on CentOS and Windows
          1. Installing SVN on CentOS
            1. Configuring SVN
            2. SVN operations
            3. Import a directory into SVN
            4. Check out from SVN
          2. VisualSVN Server on Windows
        4. Integrating Eclipse with code repositories
        5. Installing and configuring Ant
        6. Installing Maven
        7. Configuring Ant, Maven, and JDK in Jenkins
        8. Installing and configuring Git
        9. Creating a new build job in Jenkins with Git
        10. Self-test questions
        11. Summary
      10. 3. Integration of Jenkins, SVN, and Build Tools
        1. Creating and configuring a build job for a Java application with Ant
          1. Dashboard View Plugin
          2. Creating and configuring a build job for a Java application
        2. Creating and configuring a build job for a Java application with Maven
        3. Build execution with test cases
        4. Self-test questions
        5. Summary
      11. 4. Implementing Automated Deployment
        1. An overview of continuous delivery and continuous deployment
        2. Installing Tomcat
        3. Deploying a war file from Jenkins to Tomcat
        4. Self-test questions
        5. Summary
      12. 5. Hosted Jenkins
        1. Exploring Jenkins in OpenShift PaaS
        2. Exploring Jenkins in the Cloud – CloudBees
        3. An overview of CloudBees Enterprise Plugins
          1. Workflow Plugin
          2. Checkpoints Plugin
          3. Role-based Access Control Plugin
          4. High Availability Plugin
          5. VMware ESXi/vSphere Auto-Scaling Plugin
        4. Jenkins case studies from CloudBees
          1. Apache jclouds
            1. Challenge
            2. Solution
            3. Benefits
          2. Global Bank
            1. Challenge
            2. Solution
            3. Benefits
          3. Service-Flow
            1. Challenge
            2. Solution
            3. Benefits
        5. Self-test questions
        6. Summary
      13. 6. Managing Code Quality and Notifications
        1. Integration with Sonar
        2. Exploring Static Code Analysis Plugins
          1. Checkstyle Plugin
          2. FindBugs Plugin
          3. Compiler Warnings Plugin
          4. DRY Plugin
          5. PMD Plugin
          6. Task Scanner Plugin
          7. CCM Plugin
          8. Android Lint Plugin
          9. OWASP Dependency-Check Plugin
        3. E-mail notifications on build status
        4. Self-test questions
        5. Summary
      14. 7. Managing and Monitoring Jenkins
        1. Managing Jenkins master and slave nodes
        2. Jenkins monitoring with JavaMelody
        3. Managing disk usage
        4. Build monitoring with Build Monitor Plugin
        5. Managing access control and authorization
        6. Maintaining roles and project-based security
        7. Audit Trail Plugin – an overview and usage
        8. Self-test questions
        9. Summary
      15. 8. Beyond Basics of Jenkins – Leveraging "Must-have" Plugins
        1. Extended Email Plugin
        2. Workspace cleanup Plugin
        3. Pre-scm-buildstep Plugin
        4. Conditional BuildStep Plugin
        5. EnvInject Plugin
        6. Build Pipeline Plugin
        7. Self-test questions
        8. Summary
      16. Index