CommandBox and Continuous Integration

Hello,

I’m looking for some advice on using TestBox+CommandBox+Jenkins (or perhaps another CI product). There are many ways to go about this and I’m wondering if anyone experienced in using these together has come up with some basic practices that work for them. It might be easiest to learn from seeing how others are accomplishing their needs.

Some possible questions:

  • How do you have your TestBox harness/runner setup for use by Jenkins?

  • What Build Step method are you using for Jenkins (command line via command box, or a Jenkins HTTP plugin to request the runner)?

  • Which way have you setup Jenkins to use TestBox response formats (Ant, Junit, Json etc) to notify of success/fail?

  • What are you doing for deploy?

  • Anything else of interest

Hi Rory,

If you take a look at many of the modules and projects in the GitHub Ortus and Coldbox namespaces, they all use Jenkins for deployment. Many of them also integrate with Commandbox.

The i18n module is an example which uses Jenkins+Testbox+Commandbox for automated deployment (and also uses TravisCI and Commandbox to test pull requests): https://github.com/ColdBox/cbox-i18n

In that example, Jenkins is using ANT for the build and deploy process. If you take a look at workbench/build.xml, you can see how that is configured.

There are a number of other examples. For the CBMongoDB module, I use TravisCI + CommandBox to test, build, and deploy: https://github.com/jclausen/cbmongodb

HTH,
Jon

Thanks Jon these were very helpful examples.

What are your feelings on ANT for CMFL builds? The Java world seems to be down on it. Not sure if that is worth learning, or simply going the CLI/commandbox route.

I think you should use what works best for your situation and will involve the least amount of headache to get up to speed. What’s trendy isn’t always the best fit for your situation. The ANT XML syntax has a number of built-in conventions that make it easy to do common build and testing tasks. If you’re doing WAR deployments, ANT is a natural fit. Jenkins also makes using ANT very easy.

That said, I prefer to go the CLI route, whenever possible. I find the build scripts to be cleaner, more legible, and easier to debug. Whatever CI environment you use, you will still have to adapt to their build file syntax.

With that in mind. We want to define build processes using CommandBox. We
have an internal spec document, but would love feedback from the community
on how this would look like for you in CFML.

THanks