XL Deploy’s tagging feature allows you to configure deployments by marking which deployables should be mapped to which containers. Tagging, in combination with placeholders, allows you to prepare your deployment packages and environments so you do not have to manually map deployables to containers or provide configuration details at deployment time.

To perform a deployment using tags, you assign tags to deployables and containers. You can do so in an imported deployment package or in the XL Deploy user interface.

Note: It is not possible to use an environment variable in a tag.

How XL Deploy matches tags

When deploying an application to an environment, XL Deploy will match the deployables and containers based on the following rules:

  1. Both have no tags
  2. Either is tagged with an asterisk (*)
  3. Either is tagged with a plus sign (+) and the other has at least one tag
  4. Both have at least one tag in common

If none of these rules apply, XL Deploy will not generate a deployed for the deployable-container combination.

This table shows which tags match when:

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, refer to the Maven documentation.

Tagging example

Assume you have a deployment package that contains two artifacts:

  • An EAR file that represents a back-end application
  • A WAR file that represents a front-end application

You want to deploy it to an environment that contains two containers:

  • A JBoss AS/WildFly server where you want to deploy the back-end application (EAR file)
  • An Apache Tomcat server where you want to deploy the front-end application (WAR file)

By default, XL Deploy maps the EAR and WAR files to the WildFly server, because WildFly can run both types of files. To prevent the WAR file from being deployed to the WildFly server, you would need to manually remove it from the mapping.

Default mapping

To prevent XL Deploy from mapping the WAR file to the WildFly server, tag the WAR file and the Tomcat virtual host with the same tag.

Tagged jee.War and tomcat.VirtualHost

XL Deploy then maps the WAR file to the Tomcat virtual host only.

Mapping with tags