Skip to main content
Version: Early Access

Introduction to the Deploy File plugin

The Deploy File plugin is used to define resources in a deployment package and manage them on a target host. With Deploy File plugin you can deploy a file.File, file.Folder, or file.Archive configuration item (CI) on an overthere.Host CI.

For example,

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.

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.

Use in deployment packages

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>

Customizing copy behavior

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 MyDir. If 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/.

If /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.

You can also customize the copy commands that the remoting plugin uses for files and directories. For more information see, Remoting plugin and Overthere connection options.