Introduction to the Deploy File plugin
An application can depend on external resources for its configuration. The application accesses these resources from a predefined location or using a predefined mechanism. A resource can be described as a file, an archive (
ZIP), or a folder which is a collection of files.
You can use the Deploy File plugin to define these resources in a deployment package and manage them on a target host. It can deploy a
file.Archive configuration item (CI) on an
The file, folder, or archive can contain placeholders that the plugin will replace when targeting to the specific host, allowing resources to be defined independent of their environment.
Using the File plugin, you can:
- Deploy a file-based resource on a host.
- Upgrade a file-based resource on a host.
- Undeploy a file-based resource on a host.
This is a sample deployment package (DAR) manifest that defines a file, folder, and archive resource:
<udm.DeploymentPackage version="1.0" application="FilePluginSample"> <file.File name="sampleFile" file="sampleFile.txt"/> <file.Archive name="sampleArchive" file="sampleArchive.zip" /> <file.Folder name="sampleFolder" file="sampleFolder" /> </udm.DeploymentPackage>
If the location on the host where the file, folder, or archive will be copied, known as the
targetPath, is shared with other resources, you can set the
targetPathShared property on the relevant CI type to
true. Deploy will not delete the target path when updating or undeploying a deployed application. Deploy will only delete the artifacts that were copied to the target path.
Example: There is a shared directory called
SharedDir, which contains a directory that was not created by Deploy called
targetPathShared is set to
true, Deploy will not delete
/SharedDir/MyDir/ when updating or undeploying a deployed application. If
targetPathShared is set to “false”, Deploy will delete
/SharedDir/MyDir/ exists and Deploy will deploy a folder named
MyDir, Deploy will not delete
/SharedDir/MyDir/ during the initial deployment. Files with the same name will be overwritten. Deploy will delete
/SharedDir/MyDir/ during an update or undeployment.
When you create
file.Folder CI type with special characters in the file name (for example, accented characters, such as
é), the following error message is displayed:
Error The system cannot find the file specified
In Digital.ai Deploy, by default, the file names are decoded with UTF8 encoding in all the archive files. The supported values are
CP347. You can change the encoding by modifying the
xl.xldeploy.placeholders.zip-encoding property. To support the special characters in the file name, change the file name encoding by modifying the property in the wrapper configuration file as follows: