Multi-Engine CI in Travis with CommandBox 3.1.0

CommandBox 3.1.0 is just around the corner and comes with a host of amazing features! While the new ForgeBox integration deserves an entire post on its own, I want to talk about starting different CFML engines all from CommandBox.

Brad Wood outlines it on his blog here. Basically, the CFML engines are now packages on ForgeBox, and you can start a specific engine by setting the cfengine parameter for the server start command. It has never been easier!

But this is all on Brad’s blog post. I don’t need to review that for you. What I want to show is how this makes continuous integration testing on multiple CFML engines a breeze.

I’ve used CommandBox to run my continuous integration (hereafter CI) tests on Travis for a while now. It was super simple to use the testbox run command to run my tests and search for any failed tests. The one drawback with this approach, though, is that CommandBox only runs Lucee 4.5. This was okay for certain projects where the app would only be ran in Lucee, but it didn’t work well for libraries and modules.

For libraries and modules, I mostly turned to CFML-CI, a template to get multi-engine CI running on Travis using Ant. Take a look at that build.xml file, though:

(Prepare to scroll…)

😳

Hard to grok, isn’t it? Up until now, it was arguably the best way to run multiple engines.

Enter CommandBox 3.1.0.

Everything can be done from the .travis.yml file. Here’s the one I use as my template:

Up in the matrix section, I can define all the platforms to run my tests against. In the before_script section, I use the platform to start a server. Then, my simple script mentioned earlier runs my tests for me. Travis will run these engines concurrently, so I can test all my engines in the time it would take to test one.

Here’s what it looks like on Travis:

Multi-Engine CI in Travis

It’s. That. Easy.

Huge props to Denny Valiant and Brad Wood for the amazing work here. Because of this, I can better support Adobe ColdFusion on my modules, something I was constantly reacting to instead of catching with my tests. My CI set up has never been so easy.

Multi-Engine CI in Travis with CommandBox 3.1.0

Leave a Reply

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