Deploy checkouts and transfers files to the target Endpoint(s). The operation of deploy differs depending on what is currently on the stack.

With no parameters, deploy simply deploys the Component currently on the stack to the Component's associated Endpoint(s). This requires both a Component and a target Environment to be on the stack. This will be the case during a pre, post, or custom action for a Component. You can push a Component onto the stack using the using Component statement. You can push an Environment onto the stack using the using Environment statement.

deploy takes a number of optional parameters:

repository:        Mandatory. The name of the repository to use as a source of files. The repository name can be prepended with as many domain names as necessary to uniquely identify the repository.

The remaining parameters will depend on the chosen repository. The parameters specified will either override the properties defined for the repository (if the property is defined as overridable) or will be appended to them (if the property is defined as appendable). If a parameter attempts to override a property which is not defined as overridable then a runtime error is thrown.

deploy is generally only required when writing custom actions. During a conventional deployment, checkout is called for a Component before any pre action is executed and transfer is called implicitly to transfer the files to the target Endpoint(s) after any pre action has completed. Pre Action on Components can be used to modify the drop zone before the Component is deployed.

Example: Deploys all the matching .exe files to every Endpoint in the current Endpoint set:

deploy(repository: "myrep", pattern: "*.exe");

Example: Deploy all the matching .exe files to every Endpoint with a "GETEXE" attribute set to "Y".

if ($GETEXE = "Y") {

   deploy(repository: "myrep", pattern: "*.exe");