Deployment schemas
Required Roles | n/a |
Required Rights (by category) |
Infrastructure Items Deployment Schemas |
Perspective | Configuration Management |
Access | DROPS Server → Configuration → Deployment Schemas |
Deployment schemas are sets of deployment rules used to change the destination location for artifacts when they are deployed to an infrastructure item. During regular deployment, the transferred artifacts are copied to the Root Directory destination defined in the infrastructure item following the same directory structure defined in the parent component. However, you may need to change this location for a certain group of artifacts.
Deployment rules are used to assign a replacement target path for a set of artifacts defined by a RegEx filter. During the transfer stage of the deployment process, if a deployment schema that has been added to an infrastructure item is selected, all of the artifacts in the component deployed are run through the rules' RegExes. Each artifact that matches a RegEx will be redirected to the corresponding replacement path. Regular expressions can only be applied at the file name-level but they take into account the artifact key. The key is the relative path to the artifact starting from its parent component.
A Deployment rule defines a RegEx to find .SQL artifacts in the component deployed to an infrastructure item. No matter what the paths defined in the components are, any artifact that matches the .SQL RegEx is redistributed to the Target Path defined in the deployment rule. This enables you to regroup artifacts in your target service that come from multiple strategies which may each have a different source directory structure.
The ${arcad.sourcepath}
substitution variable can be used in the Target Path field. It is replaced by the artifact Key (relative path in the artifact repository).
DROPS Component directory structure | <ArtifactRepository>scripts/myScript.sql |
No Deployment Rule:
deployment path follows component directory structure |
<RootDirectory>/scripts/myScript.sql |
Deployment Rule:
*.sql → db/SQLScripts |
<RootDirectory>/db/SQLScripts/myScript.sql |
Deployment Rule:
*.sql → db/SQLScripts/${arcad.sourcepath} |
<RootDirectory>/db/SQLScripts/scripts/myScript.sql |
The deployment rules are sorted by a specific order defined by the user. The order of the rules is important because if an artifact matches several Rules, the target file name will be generated by the first rule it matches.
If an infrastructure item contains a deployment schema it will always be used. It is taken into account during the transfer stage of the deployment process.
Follow the subsequent steps to create a new deployment schema.
Step 1 To access the Create a new deployment schema wizard, either click the create icon in the Deployment Schemas view or right-click anywhere in the view and select Create a new deployment schema.
Step 2 Enter the mandatory Name of the schema.
Step 3 Click Finish.
Result New deployment schemas are available in the Deployment Schemas view.
To edit deployment schema details, either right-click on it in the Deployment Schemas view then select Edit, select the item then click the edit icon or double-click it. The Deployment Schema editor is opened where all of the entity's details are managed.
The information that defines schemas can be edited at any time by users with the rights to do so.
Enter a short Description of the schema to help you describe the RegExes defined in the schema's deployment rules.
The Deployment Rules manager displays all of the existing rules defined for the current deployment schema. The Order column defines the order that the rules will be run in if there is more than one Rule. If the rules' order numbers are not chronological, click the Reorder button and DROPS will automatically renumber each rule following the order in which they are displayed.
To create a new rule, click the Create button in the Deployment Rules manager. In the Deployment Rule dialog, define:
- the priority in the Order field. This number enables you to initially select the position this rule will have in the order rules are run. Change this number to a higher number than the last rule in the list to move it to the end of the list.
- the regular expression in the Rule field.
- the relative path on the target infrastructure item in the Target Path field.
Double-click an existing rule or select it and click the Edit button to change its settings.
To delete a deployment rule, select it then click Delete. Click OK to confirm or click Cancel to keep the rule.
Save the changes (, Ctrl+S
or File > Save).
Deleted deployment schemas cannot be accessed or recovered.
Any deployment rules defined in a deleted schema are also deleted.
To delete a deployment schema, either right-click on it in the Deployment Schemas view and select Delete, or select it and click the delete icon. Click OK to confirm or click Cancel to keep the schema.