Release Management
Overview¶
EMT can be used to perform exchange-based binary promotion released management.
This means that in a CI/CD process, the applications are built once and published to exchange, and subsequently published to runtimes.
While this process is optional for non-RTF runtimes, it is mandatory for RTF deployments. Because of that it is highly recommended to use this process for all applications so that future migration to RTF is seamless.
Out-of-the-box this problem is extremely problematic with CI/CD, because each CI build would need to have the version changed, which renders semantic versioning useless.
In order to allow meaningful semantic versioning, EMT provides a custom promotion process that works around the exchange limitations.
Publish to Exchange¶
In order to use EMT to deploy to exchange, the application's pom.xml version should always be set to a SNAPSHOT version (ie 1.0.0-SNAPSHOT)
When deploying, you should specify the maven property emt.target
and set it to exchange
. ie:
or just set the property in your pom.xml
and then run deploy normally
If you're deploying from a CI/CD pipeline, you should specify the build number using the property anypoint.deploy.buildnumber
.
For example using Azure DevOps:
In jenkins:
Publish to runtime from exchange¶
You can then deploy that version by setting the property anypoint.deploy.file
with the value exchange://${artifactId}:${version}
. For example:
Promote snapshot for production deployment¶
When you have a snapshot version that is ready to be deployed, you can use the promote command to promote that version to a non-snapshot version. This will remove the snapshot suffix from the file name as well inside the archive itself, and (unless disabled) it will delete all corresponding SNAPSHOT versions.
ie:
mvn com.aeontronix.enhanced-mule:enhanced-mule-tools-maven-plugin:1.4.62:promote -DartifactId=myapp -Dversion=1.0.1-SNAPSHOT-555
After this command is run, you will have a version 1.0.1 in exchange, and all snapshots that started with 1.0.1-SNAPSHOT-* will have been deleted.