perl distributive "early" testing with jenkins

Often when deploying application one may face the risk of divergence between testing and production environment. Even though you have a stage servers `like production one', it'd be reasonable to check distributive in production environment before release is happened. I would call it `early` testing. Yes, of course, some subtle bugs will arise only in runtime phase, and unit test cannot cover it all, I say here about prerequisite unmet issues. In perl world unit tests and prerequisites checks are executed in standart way. One follows standard procedure, when installing things.

I put here example for Module::Build based project, but with ExtUtils::MakeMaker it's almost the same:

perl Build.PL # check dependencies and generate build file
./Build 
./Build test # run unit tests

So, why not to automate this process in continues integration approach, like for example Jenkins does?

  1. Upload distributive to production server
  2. Unpack it
  3. Run standard perl Build.PL/Makefile.PL cycle to execute unit tests and check prerequisites
  4. If anything goes wrong you know it in good time, before release is happened!

So this is what I've done in jenkins perl-smoke-test plugin. Please check it out and try to use it!

Links:

Leave a comment

About melezhik

user-pic perl, chef, jenkins, configuration management