ASP.Net Web Application Continuous Integration (CI) using Jenkins automation server: Starting & setting up Jenkins

In this blog post, we will see what all  steps are involved in getting Jenkins up & running for building ASP.NET Web Application.

Note: You are currently on Part II of this series, do refer below parts for more details.

Part I: Basic Setup, Installation & Configuration

Part III: Creating & Adding SSH key to Bitbucket

Part IV: Creating Jobs In Jenkins: Getting source code from Bitbucket hosted git repository, polling the SCM to check whether changes were made, restore Nuget packages, build project using MSBuild, publish and archive the build

A. Start Tomcat Server

Open Command Prompt & navigate to Apache Tomcat “bin” directory & execute startup.bat.

Start Apache Tomcat Server

When Tomcat Server has started, you can access its home page at http://localhost:8080

Apache Tomcat Start Page

Note:  To avoid  warning “there was insufficient free space available after evicting expired cache entries – consider increasing the maximum size of the cache”, modify context.xml (“I:\Jenkins\apache-tomcat-9.0.17\conf\context.xml”) to add following block below before </Context>

<Resources cachingAllowed="true" cacheMaxSize="100000" />

B. Access & setting up Jenkins

I. Access Jenkins at http://localhost:8080/jenkins/

Access Jenkins

Copy the password from location that is shown on your screen and paste it in “Administrator password” textbox. Click “Continue”, it will take you to “Customize Jenkins” page.

II. Select “Install Suggested plugins”

Jenkins Install Suggested Plugins - most useful


Jenkins Install Suggested Plugins

III. Create First Admin User

Jenkins Create First Admin User

Fill details & click “Save and Continue”.

IV. Instance Configuration

Jenkins Instance Configuration

Click “Save and Finish” and that’s it Jenkins is ready to use.

Jenkins is ready

C. Manage Jenkins

I. Access Jenkins at http://localhost:8080/jenkins/, login & go to Manage Jenkins page

Manage Jenkins

II. Changing Jenkins Home directory (optional step – but I would recommend it)

a. Go to “Configure System”

b. You can see the current location of Jenkin’s Home directory

Jenkins - Change Home Directory

c. For changing Jenkins Home directory to your desired location, create a new system environment variable “JENKINS_HOME” & set it to your desired location for Jenkins Home directory

Jenkins - Environment Variable - Change Home Directory

Shutdown Apache Tomcat Server

Apache Tomcat Shutdown

Close Command Prompt & start Apache Tomcat Server.

Start Apache Tomcat Server

Access Jenkins & go to Manage Jenkins -> Configure System, you can view the updated Home directory.

Jenkins - Changed Home Directory

III. Install MSBuild plugin & set Path to MSBuild

a. Go to Manage Jenkins -> Manage Plugins

Manage Plugins

b. Install MSBuild plugin

Install MSBuild Plugin

c. Set MSBuild Name & Path to MSBuild on Global Tool Configuration page

Go to Manage Jenkins -> Global Tool Configuration

Global Tool Configuration

Under MSBuild section, set MSBuild Name & Path to MSBuild

MSBuild Path


Previous: Basic Setup, Installation & Configuration

Next: Creating & Adding SSH key to Bitbucket

You may also like...

3 Responses

Leave a Reply

Your email address will not be published. Required fields are marked *