DMScript (Deployment Management Scripting) is DeployHub’s own scripting language. It underpins nearly all the activities that take place during a deployment.
Users with the appropriate permissions can create their own DMScript Activities by creating custom Procedures and Functions. DMScripts can be stored in the DeployHub database (as stored procedures) or can be held in an external filesystem or even in a Repository. Storing DMScript in a Repository allows it to be version controlled.
Actions are a set of Functions and Procedures that define your deployment Workflow logic. You use the action editor by dragging and dropping Functions and Procedures onto the design pallet, connecting the order in which they execute. When you run the Action, DeployHub parses the Functions and Procedures in the Action Workflow, generates one big DMScript which is then passed to the deployment engine for deployment execution.
Although it is not necessary to understand DMScript in order to use DeployHub, doing so will allow you to create more sophisticated and highly custom deployments. It is also useful to understand the Stack Architecture which underpins DMScript – this will allow you to understand variable scoping and inheritance which is useful even if you generate all custom activities via the Action Workflow Editor.
Knowledge of DeployHub and its various objects (Environments, Endpoints, Applications, Components etc.) and how they interact is also assumed. Web Based API calls assume some knowledge of SOAP and RESTful interfaces.
DeployHub can call any external script or program (either locally on the deployment engine or remotely on the target Endpoint during a deployment). Given that fact, why would you need to use DMScript?
- Knowledge of the DeployHub object model. For example, DMScript allows you to find all the Endpoints in an Environment that have a particular attribute. Doing this in external scripts is difficult if not impossible.
- Full knowledge of the attributes set against the selected objects. Use values that have been set against Endpoints, Environments or Applications.
- A RESTful and SOAP API client. Makes calls to external systems (or even DeployHub's own API) quickly and easily.
- A built-in JSON/XML parser. This means the results of RESTful and SOAP API calls are available as variables within DMScript without the need for complex parsing.
- A built in ODBC tool. You can query (or update) databases and have the results available in your DMScript. This means you can query a database as part of a deployment activity and perform different steps dependent on the results of the query.
- A built-in LDAP query tool. Query LDAP Endpoints and use the results in your scripts.
- A built-in mail client. You can construct your own emails (with attachments) and control when they are sent and to whom. This is useful if the normal DeployHub "template" mechanism is insufficient for your needs.
- A built-in base64 encoder/decoder.
- Built-in support for parallel execution. Run scripts on different Endpoints in parallel.
- Fine control over the deployment scheme. If you want to change the default deployment mechanism, you may want to use DMScript.
If you need to do any of these things, either as part of a deployment activity or as part of an integration (for example, notifying an external system when an Application Version has been moved or deployed) then you may need to use DMScript.