Use tags to configure deployments
You can use the tagging feature to configure deployments by marking which deployables should be mapped to which containers. By using tagging, in combination with placeholders, you can prepare your deployment packages and environments to automatically map deployables to containers and configuration details at deployment time.
To perform a deployment using tags, assign tags to deployables and containers. You can assign tags in an imported deployment package or in the Deploy user interface.
Note: You cannot use an environment variable in a tag.
Matching tags in Deploy
When deploying an application to an environment, Deploy pairs the deployables and containers based on the following rules:
- Deployables and containers do not have tags.
- One of the deployables or containers is tagged with an asterisk (
*
). - One of the deployables or containers is tagged with a plus sign (
+
) and the other has at least one tag. - Deployables and containers have at least one tag in common.
If none of these rules apply, Deploy will not generate a deployed for the deployable-container combination.
This table shows tag matching in Deploy:
Deployable/container | No tags | Tag * | Tag + | Tag X | Tag Y |
---|---|---|---|---|---|
No tags | ✅ | ✅ | ❌ | ❌ | ❌ |
Tag * | ✅ | ✅ | ✅ | ✅ | ✅ |
Tag + | ❌ | ✅ | ✅ | ✅ | ✅ |
Tag X | ❌ | ✅ | ✅ | ✅ | ❌ |
Tag Y | ❌ | ✅ | ✅ | ❌ | ✅ |
Setting tags in the manifest file
This is an example of assigning a tag to a deployable in the deployit-manifest.xml
file in a deployment package (DAR file):
<?xml version="1.0" encoding="UTF-8"?>
<udm.DeploymentPackage version="1.0" application="MyApp">
<orchestrator />
<deployables>
<jee.War name="Frontend-WAR" file="Frontend-WAR/MyApp-1.0.war">
<tags>
<value>FRONT_END</value>
</tags>
<scanPlaceholders>false</scanPlaceholders>
<checksum>7e21b7dd23d96a0b1da9abdbe1a2b6a56467e175</checksum>
</jee.War>
</deployables>
</udm.DeploymentPackage>
For an example of tagged deployables in a Maven POM file, see Maven documentation.