Automatic Release Resolver

In some cases, the release number generated during the import process must be fixed automatically without any manual input. the automatic release resolver is a script executed at the beginning of the import process to extract the release number value.

Getting started

To use the automatic release resolver:

The resolver is executed at the beginning of the import process, to retrieve a release number. If a release with the retrieved release number already exists for the parent application, then this release will be used as the target release. If not, ea new release will be created using a number provided by the script and this release will be used as the target release.

In the Configuration Explorer, go to Artifacts > Applications. Right-click on your application and choose Edit the Release Resolver Script in the contextual menu. Define the release resolver script in the ANT script editor.

Edit the release resolver script

Create a release with the *AUTO release number. This option is only available if the resolver is activated in the settings. When executing the import, select this release to trigger the release resolver mechanism.

Import with the release resolver

How to write a release resolver script

The release resolver script is an ANT script.

  • The ANT Libraries that can be used are located in the directory defined by the value of the Resolver ANT Libraries Directory field of the DROPS - Import Process | Release Resolver Settings Section
  • The ANT Script base directory is the directory defined by the value of the Resolver Execution Directory field of the DROPS - Import Process | Release Resolver Settings Section

The script is executed on the target called main. This target must exist in your system.

Assign the generated release number to a the property resolved.release.

Reach the parent application values using the ${application.<fieldname>} ANT properties.

Sample script to set a fixed release number

Copy
<?xml version="1.0" encoding="UTF-8"?>
<project name="script_template" 
         basedir="." 
         default="main">  
    
      <target name="main"
            description="The main target">           
        <property name="resolved.release" value="2.0.1.3"/>
        
    </target>    
</project> 

Sample script based on a properties file which location depends on the application code

Copy
<?xml version="1.0" encoding="UTF-8"?>
<project name="script_template" 
         basedir="." 
         default="main">  
    
      <target name="main"
            description="The main target">  
          
          <!-- Define a strategy root directory -->
          <property name="importDirectory" 
                    value="c:/md/test/strategy"/>
          
          <!-- Get a property file based on the parent application -->
          <property file="${importDirectory}/${application.code}/import.properties"/>          
          
          <!-- Use the value of the property called releasenumber located into the
               c:/md/test/strategy/RMP-APP1/import.properties file -->
        <property name="resolved.release" value="${releasenumber}"/>
        
    </target>    
</project>