O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hudson 3 Essentials

Book Description

Here is a book that makes life easier for Java developers or administrators by teaching you how to automate application testing using Hudson 3. Fast-paced and hands-on, the guide covers everything from installation to writing plugins.

  • A practical guide that will teach you how to deploy Hudson 3 on an open source application server
  • Run Hudson 3 in standalone mode for testing and evaluation
  • Learn how to build, test, and deploy your applications with Hudson

In Detail

Continuous integration (CI) with automated test execution has been widely adopted in recent years. The concept behind CI has changed how companies look at Build Management, Release Management, Deployment Automation, and Test Orchestration. Hudson is a CI solution that provides executives, business managers, software developers, and architects with a better sense of the development progress and code quality of projects throughout their development life cycle.

A fast-paced and hands-on introduction to the key features of Hudson 3. You will be introduced to tools that can be used to improve the quality of software development projects. You will also learn how to install and secure Hudson in a variety of IT environments.

Staring with a brief introduction to Hudson and how it helps many IT organizations deliver high quality software, Hudson 3 Essentials will show you how Hudson can be installed and deployed in various environments. You will also be guided through the different methods of securing your Hudson installation.

Moving on from the basics, you will be introduced to several important Hudson plugins and learn how to extend its functionality by developing your own plugins. You will be shown how Hudson can be used to build different types of applications and how it can deploy a web application to an application server. Finally, you will discover how Hudson can be used to perform automated testing on software applications, and how to generate reports that describe the results.

Table of Contents

  1. Hudson 3 Essentials
    1. Table of Contents
    2. Hudson 3 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. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Why Hudson?
      1. Benefits of Hudson
        1. Hudson can improve project health
        2. Hudson can automate the build and deployment process
      2. IT roles in relation to Hudson
      3. Hudson plugins and integrations
      4. The Hudson back story
      5. Summary
    9. 2. Installing and Running Hudson
      1. Environment variables
      2. Hudson prerequisites
      3. Downloading Hudson
      4. Running Hudson WAR without an application server
      5. Unix/Linux installation
      6. Tomcat installation and setup
      7. Deploying Hudson to Tomcat
      8. JBoss AS 7 installation and setup
      9. Deploying Hudson to JBoss AS 7
      10. GlassFish 4 installation and setup
      11. Modifying GlassFish 4 settings
      12. Deploying Hudson to GlassFish 4
      13. Hudson CI Server initial setup
      14. Hudson Home directory
      15. Summary
    10. 3. Configuring and Securing Hudson
      1. Hudson home page
      2. Hudson help
      3. Configuring Hudson
      4. Configuring the system
        1. Configuring JDK
        2. Configuring Ant
        3. Configuring Maven
      5. Configuring Hudson for sending e-mails
      6. Backing up Hudson
      7. Configuring security
        1. Hudson authentication
        2. Hudson authorization
      8. Defining a simple security policy
      9. Summary
    11. 4. Installing and Developing Hudson Plugins
      1. What is a plugin?
      2. Installing plugins
        1. Installing featured plugins
        2. Installing recommended plugins
        3. Installing other plugins
        4. Plugin configuration
      3. The ThinBackup plugin
        1. Configuring our backup strategy
      4. Creating a Hudson plugin
        1. Downloading and installing Apache Maven
        2. Adding the Maven HPI plugin
        3. Using JDK 1.6
        4. Creating the sample-plugin project
        5. Structure of the sample-plugin project
        6. Creating the sample-plugin HPI file
        7. Running the sample-plugin project
        8. Creating a sample job
        9. What happened?
        10. How did that happen?
        11. What else can I do?
        12. Deploying sample-plugin to our Hudson installation
      5. The sample-plugin project source code on Github
      6. Summary
    12. 5. Building and Delivering with Hudson
      1. Using Maven to build a sample project
        1. Creating a free-style software job for the Maven job
        2. Configuring Source Code Management for the Maven job
        3. Configuring the build step for the Maven job
        4. Saving the Maven job
        5. Manually building the Maven job
      2. The Hudson home directory structure
      3. Using Gradle to build a sample project
        1. Creating a free-style software job for the Gradle job
        2. Configuring Source Code Management for the Gradle job
        3. Saving the Gradle job
        4. Manually building the Gradle job
      4. Using Grails to build a sample project
        1. Creating a free-style software job for the Grails job
        2. Configuring Source Code Management for the Grails job
        3. Installing the Grails Hudson 3 plugin
        4. Downloading and configuring Grails
        5. Configuring the build step for the Grails job
        6. Saving the Grails job
        7. Manually building the Grails job
      5. Deploying a WAR file to an application server
        1. Installing the Deploy to container Plugin and Copy Artifact Plugin
        2. Reconfiguring Tomcat
        3. Configuring the Deploy build step
        4. Executing and validating the job
      6. Performing a custom action with a Groovy script
        1. Configuring Groovy
        2. Adding a Groovy build step to the job
        3. The testScript.groovy Groovy script
      7. Summary
    13. 6. Testing and Reporting with Hudson
      1. The hudsonDemoProject
        1. Creating a free-style software job
        2. Configuring Source Code Management
        3. The project layout
      2. Generating and publishing Javadoc
        1. Configuring a post-build action for the hudsonDemoProject job
      3. Running and publishing JUnit test reports
        1. Updating the Gradle build step for the hudsonDemoProject job
        2. Configuring a post-build action
      4. Static source code analysis
        1. PMD
        2. FindBugs
        3. Checkstyle
        4. More about the Gradle build file
        5. Updating the Gradle build step
        6. Configuring post-build actions for the hudsonDemoProject job
        7. Building and analyzing the results for the hudsonDemoProject
      5. Trend analysis of hudsonDemoProject
      6. Summary
    14. 7. Upgrading Hudson and the Team Concept feature
      1. Checking Hudson and plugin upgrade availability
      2. Backing up Hudson
        1. Upgrading Hudson automatically
        2. Installing a new standalone Hudson WAR file
        3. Installing a new Hudson WAR file on Tomcat
        4. Installing a new Hudson WAR file on JBoss AS 7
        5. Installing a new Hudson WAR file on GlassFish 4
      3. Team Concept
        1. Creating new users
        2. Configuring team-based authorization
        3. Creating teams
        4. Adding members to teams
        5. Creating new jobs
        6. Assigning jobs to teams
        7. Verifying job visibility
      4. Summary
    15. A. Online Resources
      1. Software downloads
      2. Hudson resources
      3. Application server resources
      4. Hudson 3 Essentials book projects
    16. Index