Setup Jenkins for .NET Build and Deployment

I have used Jenkins for applications based on Java, OSB, PHP, Node JS, etc running on Linux/Unix platforms. Recently I got a chance to work on Windows platform for build and deployment of .NET applications using Jenkins and Octopus.

This article covers following points:

  • Checkout code from Git
  • Build the code
  • Package the code
  • Push to Octopus for deployment

Once the code is pushed to Octopus, Jenkins job finishes and you can login to Octopus server deployment. I will cover the setup of Octopus in a separate article.

Let’s begin.

  1. Install Slave on the Windows build server. This is not the server where deployment will happen, rather this is build server. You can install Octopus on the same server if required.

    Installation instruction can be found here for Jenkins slave setup.

  2. Now create a Job on Jenkins master server which will run on slave. Let’s call Jenkins slave as ‘octo’. This is just a label to identify slave server. Also, I am using latest release of Jenkins with JDK 1.8. This is how first part of the job looks like.

  3. Now add the Git repository with appropriate credentials. I have added dummy detail in below snapshot that’s why there is error reported.


  4. Once code is checked out we will build it. It will require MSBuild plugin to be installed in Jenkins. It will also require nuget executable to be installed on slave server.
  5. MSBuild runner needs to be configured on the Jenkins master server. Go to Manage Jenkins > Global Tool Configuration and then configure MSBuild runner as shown below:

    The path specified above must be present on your slave server, which is actually used as a build server.

  6. Now go to “Build” section of this job and select “Build a Visual Studio project or solution using MSBuild” option.

  7. Next step is to package your application using nuget command.

  8. The last step is to push the package created in above step to Octopus server. Here you have to specify details of your Octopus server like URL, API Key and also the package created in above step.

Once last step executed successfully, you can check the logs and it will look like this:


I hope it will be useful for everyone out there who want to use Jenkins for auto deployment of .NET applications. Please feel free to contact me if you have any question.


AWS Updates – Oct 2017 First Week

AWS keeps on adding up new services or enhancing existing services on regular basis. I have been very keen to know their latest updates and so do others too I believe.

I have summarized the updates for last one month and below are the highlights. I hope it will help you stay updated with the AWS world.

  1. Amazon Linux AMI 2017.09

    This is the latest version of Amazon Linux AMI and it is available in all AWS regions now. The new AMI is highly stable, secure and high in performance. It is recommended to upgrade existing instances to leverage the enhancements in new AMI. Some of the noted features in this AMI are:

    1. Python 3.6 – The newest Python version is now included in this AMI.
    2. Ruby 2.4 – The latest version of Ruby is now available by default.
    3. OpenSSL
    4. HTTP/2 Protocol

    And much more.

  2. Upcoming Regions
    1. AWS will be opening a new region in Middle East by 2019. It will be based in Bahrain, will be comprised of three Availability Zones.
    2. There is also a plan to open an edge location in the UAE. It is scheduled to be opened in 2018. It will host Amazon CloudFront,, Amazon Route53, AWS Shield and AWS WAF services.

    As of today, AWS is running with 16 regions and 44 availability zones across the world.

  3. More updates on multiple services

    Here are some of the recent enhancements announced.

    1. Monitoring for Cross-Region replication of S3 objects.
    2. Tags for spot instances.
    3. PCI DSS compliance for 12 more services.
    4. HIPAA eligibility for WorkDocs.
    5. VPC Resizing.
    6. AppStream 2.0 Graphic Design Instances.
    7. AMS Connector App for ServiceNow.
    8. Regtech in the Cloud.
    9. New & Revised Quick Starts.

Build and Deploy OSB Projects using Jenkins

I have been working on Jenkins for a while now. Primarily, my focus is on automated deployment of Oracle Fusion applications using Jenkins. I started with ADF deployments which includes following steps:

  1. Check-out the code from Subversion (SVN)
  2. Build the EAR file
  3. Run SonarQube rules for Code Analysis
  4. Get approval from development lead using Build Promotion Plugin
  5. Application deployment
  6. Send status email to initiator

To extend this workflow, I have setup OSB deployments in a similar fashion. There are only two differences in this process:

  1. Create JAR file instead of EAR
  2. Apply customization file after every deployment

Below is the list of tools/technologies and Jenkins plugins used in this process.

  1. Jenkins
    1. Parametrized build plugin
    2. Build promotion plugin
    3. Build Pipeline plugin
  2. SVN – for version control
  3. configJar – OSB bundled tool to create JAR files
  4. WLST – Scripts to import and deploy JAR files followed by applying customization file

Here is the step-by-step guide of how to setup Jenkins for OSB projects:

Step 1: Since I have many OSB interfaces, I have setup one job per environment instead of creating one job per interfaces. That helps me in effective management of Jenkins’ jobs. Something like this:

  1. OSBBuild_Development – For Dev environment
  2. OSBBuild_Integration – For Integration / Test environment, and so on.

Step 2: Each job will prompt for two parameters – OSB project name and environment where it needs to be deployed.


Step 3: These parameters will be passed on to next job which is to get approval from leads. Leads will receive an email with promotion link

Step 4: Once promoted/approved, an email will be received by deployment team. That email will also contain a link which can be used for deployment.

Step 5: Deployment job is divided into following parts:

  1. Checkout code from SVN
  2. Build and Create JAR with same name as provided in the Step 2.
  3. Invoke WLST script and deploy the JAR on environment selected in Step 2.


This concludes the high-level details of automation process of OSB deployment using Jenkins along with integrated approval process. If you have any query, please contact me.