Versioning

Templates must follow versioning principles to allow seamless integration with PlatformManager and IntegrationManager.

Versioning Principle

Until now, there was a repository with develop and master branches. We elevated those branches to support different IM versions. From now on, branches are:

  • develop, develop-im1.2.0-SNAPSHOT, develop-im.1.3.0-SNAPSHOT and so on. The IM version in the branch name shows the minimal supported version for this particular template. Branch is not needed if there is not a requirement to create a new template or change the current template in the new IM version.

  • master, master-im1.2.0-SNAPSHOT, master-im.1.3.0-SNAPSHOT and so on, mirroring the previous principle, but for PROD deploy.

In addition, in every template pom.xml, there is the <minimalIntegrationVersion> parameter. This parameter is now an interval and the interval must be closed from left with this IM version, unless the template remains the same.

Also, <version> in pom.xml needs to change. It must be named with the suffix -for-imXXX.

Example

We have a repository with the develop and master branches compatible with the current IM. In the repo, we have template1 and template2, in which we have set minimalIntegrationVersion not limited form right ([1.1.0,)]. However, IM 1.2.0-SNAPSHOT got released and there was a breaking change in our template2.

Steps to execute:

  1. Create a new branch develop-im1.2.0-SNAPSHOT from the previous, most recent branch (develop).

  2. Alter template2/pom.xml accordingly:

    • <version>1.X.X-SNAPSHOT</version> change to <version>1.X.X-SNAPSHOT-for-im1.2.0-SNAPSHOT</version>

    • <minimalIntegrationVersion>[1.1.0,)</minimalIntegrationVersion> change to <minimalIntegrationVersion>[1.2.0-SNAPSHOT,)</minimalIntegrationVersion>

  3. Change the template definition accordingly.

  4. Make sure that tests pass successfully.

  5. Switch to the previous, most recent branch (develop) and update minimalIntegrationVersion to match new behavior (<minimalIntegrationVersion>[1.1.0,1.2.0-SNAPSHOT)</minimalIntegrationVersion>

  6. Commit and handle the master branch in the same way.

Notice that we did not do any changes to template1, neither we changed its version or minimalIntegrationVersion. Do not alter existing templates if you do not need to change them.

Example 2

Take the scenario from the previous example. Now, versions of IM 1.3.0-SNAPSHOT and IM 1.4.0-SNAPSHOT arrived. The first mentioned version was without breaking changes and no new templates were developed, the latter has a breaking change in template1.

Steps to execute:

  1. Create a new branch develop-im1.4.0-SNAPSHOT from previous, most recent branch (develop-im1.2.0-SNAPSHOT)
    (Branch for IM1.3.0-SNAPSHOT is not needed as there were no changes.)

  2. Alter template1/pom.xml accordingly:

    • <version>1.X.X-SNAPSHOT</version> change to <version>1.X.X-SNAPSHOT-for-im1.4.0-SNAPSHOT</version>

    • <minimalIntegrationVersion>[1.1.0,)</minimalIntegrationVersion> change to <minimalIntegrationVersion>[1.4.0-SNAPSHOT,)</minimalIntegrationVersion>

  3. Change the template definition accordingly.

  4. Make sure that tests pass successfully.

  5. Switch to the previous, most recent branch (develop-im1.2.0-SNAPSHOT) and update the minimalIntegrationVersion to match new behavior (<minimalIntegrationVersion>[1.1.0,1.4.0-SNAPSHOT)</minimalIntegrationVersion>

  6. Commit and handle the master branch in the same way.

Notice that we did not do any changes to template2.

 

This table illustrates these two examples:

 

IM1.1.0

IM.1.1.18

IM1.2.0

IM1.3.0

IM1.4.0

IM1.5.0

 

IM1.1.0

IM.1.1.18

IM1.2.0

IM1.3.0

IM1.4.0

IM1.5.0

template1

<version>1.X.X-SNAPSHOT</version>

<version>1.X.X-SNAPSHOT-for-im1.4.0-SNAPSHOT</version>

develop

develop-im1.4.0-SNAPSHOT

template2

<version>1.X.X-SNAPSHOT</version>

 

 

develop

develop-im1.2.0-SNAPSHOT

PlatformManager version 1.75.0