Continuous Integration Setup with Jenkins for a Node.js Project – Part 1

For continuous integration for Node.js projects, there’s Travis and there’s Wercker.  But sometimes, you need to have your continuous integration tool hosted on your own server, and that is where Jenkins comes at an advantage.  It’s been around way before Travis and Wercker, and some of you may remember it as Hudson.  Also, Jenkins is free for both public and private repos.  Furthermore, it has tons of plugins such as unit testing, code coverage, Javascript linting/hinting, etc etc.  On the downside, Jenkins is the hardest to set up among the three, and that is why I wrote this post.  We’ll learn how to set up continuous integration with Jenkins for a Node.js project.  In the first part of this series, we will install Jenkins on our own server, whether it be on Heroku or your own web host or what have you.

There are 3 files to place on your server – jenkins.war, pom.xml, and Procfile, each of them being on the same directory level on your server.  The jenkins.war can be downloaded from the Jenkins site at  The pom.xml is very basic and has what the server needs to run the war.  The Procfile contains the necessary commands to run the jenkins.war.


<project xmlns=""


# Only listen on http; disable ajp and https
web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1

The files can be found at –

Of course, this is just one way to install Jenkins on your server.  Alternate ways to install it on your server (i.e., Ubuntu/Debian) can be found at the Jenkins website,

At this point, Jenkins should be installed and running on your server.  You’ll see the default Jenkins dashboard with the mustache guy at the top left.  In part 2, we’ll set up all the basic configurations necessary in Jenkins and installing and integrating with GitHub.

Leave a Reply

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