CloudBees Flow Best Practices: Versioning

Written by: Electric Bee

2 min read

Stay connected

If you have any kind of software development experience you are already familiar with the imperious need to use some kind of Source Control Management (SCM) tool such as Perforce or Subversion. In this article we will explore the available options to use such a system for your CloudBees Flow development needs. As of ElectricCommander 4.2.3 there is no automatic versioning of your projects, procedures and steps. However until such a feature becomes available natively, there are other ways to implement versioning. The first option is to simply use the “copy” button in the UI to duplicate a project or a procedure and rename it by adding a version number. The problem with this approach is that it will clutter your environment very quickly. You can move your procedures into a “storage” project to help with that using the “EC-Utility:Copy Procedure” and for project uncluttering, you can simply remove the “read” permission (thus making the project invisible to users who lack read permissions). Check the clone() API to copy and move objects automatically.

This approach is best used to simply keep a copy of major releases. I used this approach with my early versions of EC-Admin. The second option is to connect ElectricCommander to your SCM server to let the latter take care of the versioning. Simply export your projects and/or procedures into a XML file using ectool (or the Perl API) and check the file into your favorite SCM.

This approach works very well because two consecutive exports of the same unmodified object produce the exact same XML file so you can automatically check in and let the SCM decides if a new version needs to be created or not. I would recommend exporting each procedure individually in a project directory for a better granularity. For major releases, simply add a tag or label to your versioned files. What strategy do you currently use in your enterprise to keep track of your different versions and to help restore something from the past? In the next installment of this series, we will look on how to use plugins to help manage multiple active versions and to deploy from a test server to a production server. As usual, please let me know if this topic is useful to you by contacting us directly by email .

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.

Loading form...
Your ad blocker may be blocking functionality on this page. Please disable for an improved experience.