Jenkins - Installation and Setup

 
Jenkins is useful tool for automating the build process of a software. It has trigger points based on which the builds can be triggered which is a good time saver and you immediately know when something is broken in your code base.

Installing Jenkins

  1. Download Windows version of Jenkins from https://jenkins.io/download/​ Choose Windows in the list.
  2. Follow the onscreen instructions to complete the installation.​
  3. If the installer says it is not able to detect Java Development Kit or Java Run Time, you can download the OpenJDK from one of the providers like Eclipse Adoptium or Amazon Correto. For more details, refer to the article Java is still Free written by Java Champions.
  4. After installation completes, it will open http://localhost:8080/​
    1. Didn't open? Follow the steps in the next section to change the port number.

Changing Port Number of Jenkins

If Jenkins doesn’t show up in http://localhost:8080/ follow the below steps to change the port number of Jenkins. This is because the port number 8080 might be used by some other application​
  1. Using Notepad, open jenkins.xml file present at​
    • C:\Program Files (x86)\Jenkins\jenkins.xml​
  2. Search for “--httpPort=8080” in the XML file and change port number to desired value, say 8081​

Launching Jenkins 

Jenkins with Run Executable Support

By default, Jenkins doesn't have ability to run executables present in local system. To add ability to Jenkins for it to launch executable, use the below command in Command Prompt with Run as Administrator.
java -jar "C:\Program Files (x86)\Jenkins\jenkins.war" --httpPort=8081

Here replace 8081 with the port number you would like to use.

Jenkins Normal Run

If you want to launch Jenkins without ability to run executable, follow the below steps
  1. Open command prompt as Administrator and run below commands.
    • cd "C:\Program Files (x86)\Jenkins"
      jenkins.exe start
  2. Now open http://localhost:8081/ in your browser & follow the onscreen instructions.

No comments:

Feel free to leave a piece of your mind.

Powered by Blogger.