Implementing Continuous Integration Using Jenkins

Salesforce & Continuous Integration – Overview

Due to Salesforce evolvement in recent years, each and every organization that uses Salesforce undergoes frequent customizations (including manual changes), builds and migrations between environments. This cause considerable increase in effort and cost. To decrease the fore-mentioned factors in addition with quality of the deliverable, Continuous Integration can be used.

Continuous Integration – Business Values

  1. Faster delivery time to Market
  2. Higher Quality – Discover conflicts and bugs early, thus increase quality of application
  3. Monitor deployment status
  4. Low Deployment Risk during production rollouts
  5. Improves (software development teams)
    a. Speed
    b. Productivity
    c. Sustainability
  6. Reduce
    a. Operational cost
    b. Time to market
    c. Production incidents & Defects
    d. Overhead effort

Continuous Integration – Flow

Jenkins server poll bit bucket at regular intervals to check if there is changes in source repository. If there are changes, ANT migration tool will retrieve the changes and deploy the same into target organization. Once deployed, notification on success or failure can be sent via email or any other plugins installed in Jenkins. Salesforce plugins are available to send the notification as chatter results.

Continuous Integration – Key Take Away’s

  1. Run Tests in Real world, increases code coverage, reduce code review time
  2. Automated Deployment, decreases manual intervention and mistakes
  3. Self-Testing & Fast Builds
  4. Frequent Commits
  5. Code consolidation
  6. Test result availability


Following software’s shall be used to implement CI in Salesforce

  1. Jenkins
  2. Apache ANT
  3. Git – Central code repository
  4. Eclipse

Practice to follow – for seamless delivery:

  1. For a project or a release maintain only single source of repository
  2. While building packages, automate the process by making use of ANT scripts
  3. Automate the testing if possible to run the sanity rather than manual intervention
  4. Automate the deployment into target organization using ANT scripts
  5. Notify the intended stake holders about the status of deployment, for debugging if an issue occurs.

Download this article as a pdf here