Book Image

Jenkins 2.x Continuous Integration Cookbook - Third Edition

By : Mitesh Soni, Alan Mark Berg
Book Image

Jenkins 2.x Continuous Integration Cookbook - Third Edition

By: Mitesh Soni, Alan Mark Berg

Overview of this book

Jenkins 2.x is one of the most popular Continuous Integration servers in the market today. It was designed to maintain, secure, communicate, test, build, and improve the software development process. This book will begin by guiding you through steps for installing and configuring Jenkins 2.x on AWS and Azure. This is followed by steps that enable you to manage and monitor Jenkins 2.x. You will also explore the ways to enhance the overall security of Jenkins 2.x. You will then explore the steps involved in improving the code quality using SonarQube. Then, you will learn the ways to improve quality, followed by how to run performance and functional tests against a web application and web services. Finally, you will see what the available plugins are, concluding with best practices to improve quality.
Table of Contents (11 chapters)

Using different ports for Jenkins

By default, Jenkins runs on port number 8080.

Getting ready

There are scenarios where Tomcat is running on 8080, or any other application is running on 8080 port. In such cases, to avoid port conflicts you need to change the Jenkins port.

How to do it...

Let's change a port on which Jenkins runs:

  1. If you run Jenkins using the command line, then you can execute a command such as java -jar -httpPort=9999 jenkins.war to change the existing port from 8080 to 9999.
  2. Another way to change the port while Jenkins is installed using the Windows package is as follows:
    • Go to the Program Files/Jenkins directory where you installed Jenkins
    • Open the Jenkins.xml in the editor
    • Find "--httpPort=8080" and replace the port 8080 with the new port number

How it works...

First, you installed a virtual image of Ubuntu, changed the password so that it is harder for others to log in, and updated the guest OS for security patches.