Tag Archives: jenkins

Don’t blame Jenkins (all the time)

I use Jenkins to run my Continuous Integration server. I am the sole developer on the project but I still find it useful to run the tests on a different machine. There are a couple of benefits to having a Jenkins server running. First of all it lets my local machine be available at all times. Meaning I am never taking up resources to run my entire test suite. Also I have a pretty large test suite so it’s nice not to have to wait for it to finish. Also the more selenium tests you have running the longer the process will take. Also when you run selenium tests locally it pops open the browser each time so you have to keep minimizing it. Moving on to the point of this post.

Usually when I have an issue with my Jenkins server I assume something happened during the test run. Jenkins must have not ran correctly no way can it be my code. Well I got burned by this. I let my Jenkins server runs fail for about a week before I really took the time to investigate the actual issue. I was assuming something happened specially with Jenkins. Maybe an update I did on Firefox or Jenkins. Well it turned out that it wasn’t Jenkins fault but instead it was mine. I had updated my code base to use the latest version of Yii but forgot to update the Jenkins server to that version. I did this a while ago so that is why I wasn’t thinking of it right away. I was not using the features of the latest version until my recent code push. To make a long story short always trust Jenkins and investigate issues right away. Most of the time it will be a problem with your code not how Jenkins is handling it. At the end I have a passing Continuous Integration server but the process took a lot longer than it should have.

Jenkins vs Travis

I have used both Jenkins and Travis CI professionally. Both tools will do the job but there are some distinct differences between them. I believe that you can get the job done with either one of them and the purpose of this post isn’t to pick one or the other. I think they bot viable tools and depending on the situation one may be better than the other.

Travis is free for open source projects. However it will cost you if your project is private. The cost starts at $129 per month and goes up from there. The cost isn’t that bad if you have many projects that you want to host and don’t have your own server to host them. They charge you a service fee not a per project fee. The price for Jenkins is free if you set it up on your own server. You can use it both for open source and private projects. There is also Jenkins hosting available if you are unable to configure the server yourself. That would come at a cost though.

Travis is maintenance free because it’s being hosted for you. They handle all of the server updates. All you have to do is maintain a configuration file. The configuration file is basically the toolset you are using. For example the Ruby version or PHP version you are using. Jenkins requires little maintenance and has a built in GUI tool. The purpose of the tool is to allow for easy updates. If you are hosting on your own server you will have to maintain that server to. Maintaining a server is a little work but not a ton of effort required for that either. Basically just updates from the operating system.

Travis has a very fast setup time. All you need to do is create a configuration file. This takes little effort to get going. Jenkins has a little bit of setup time ranging from a couple of hours to a couple of days. This depends on the types of projects  you are setting up. There is a lot of documentation out there to setup a Jenkins server to. This is available in languages such as PHP, Ruby on Rails and Android. From my personal experience I have found that setting it up is pretty straight forward. Also once it’s complete it’s very simple to maintain.

My opinion is that either of these continue integration servers will do the job. It really depends on if you would rather spend the time upfront setting it up or just pay a monthly fee. If your project is open source Travis would be the best option in my opinion because there is no setup time and no fee. If your project is private Jenkins would be the best option in my opinion because the setup time is minimal and maintaining the server is pretty simple. I think either one you use would work. It just depends on personal preference and the situation your project is in. I use both currently and love both for different reason.