DataStar Command Line Parameters
The task is used to execute the Command Line Utility. This can be run one of the following modes:
- Deployment - this provides the ability to deploy a packaged build of scripts to a target environment and optionally create the scripts necessary to reverse the changes.
- Reversal - the reversal mode will apply the scripts necessary to back out a previous deployment where reversal scripts were generated.
- Generate - the generate mode allows you to generate the scripts from a template so that you can automate the extract from an environment.
- Export - the export mode allows to export scripts and deployment logs that have been persisted in the deployment tables from previous deployments.
Please report a problem to email@example.com if you are facing problems in making this task work. You can also share feedback about the task like, what more functionality should be added to the task, what other tasks you would like to have, at the same place.
- Mode: Specify the mode depending on the purpose of the task. This controls what options can be specified and will result in sections and options being shown or hidden.
- Manifest Directory: [Deployment, Reversal] Specify the directory where the manifest files (for deployments this is where the build is extracted to), the manifest file is the instruction file that controls the execution order of the scripts.
- History Id: [Reversal, Extract] Specify the database deployment history identifier, this optional and is used to identify deployment to be reversed or extracted. If not specified and you have provided the work item reference then this history id will be taken as the most recent history record for the work item.
- Artifacts: [Deployment, Reversal] Specify the artifact files that should be executed and their order. This is an optional setting and if left blank all manifest files (*.mf) will be processed in alphanumeric order.
- Work Item: [Deployment, Reversal, Extract] Specify the numeric work item reference that identifies the deployment package (this does not have to be a TFS Work Item reference, but must be an integer).
- Version Reference: [Deployment, Reversal] Optionally you can include a version reference used to identify a specific version being deployed. This must also be an integer.
Database Connection settings
The task needs to connect to a database, the connection settings are specified with the following parameters. The parameters listed with a * are required parameters for the task.
- Data Source: The server (and instance if applicable) in the format "server\\instance".
- Initial Catalog: The name of the database associated with the connection.
- User Name: The user to be used when connecting to the database. If not specified then the connection will be made using Integrated Security.
- Password: Optional password if not using default credentials. You should use a variable to encrypt the password by marking the variable as secure.
[Deployment, Reversal] If reversal is enabled then the task will take a snapshot of the target database prior to executing the scripts and will generate the scripts necessary to revert whatever changes are made.
- With Reversal: Tick the check box to enable the reversal mode.
- Template Directory: The directory holding the templates that should be used to generate the reversal scripts. The templates can be included in the release task as a build artifact, we suggest using a location such as $(System.ArtifactsDirectory)/DataStar.Templates/Templates
- Output Directory: The location where the output scripts should be generated. As an example this could be set to: $(System.ArtifactsDirectory)/DataStar.Output
[Deployment, Reversal] If auditing is enabled then the task will store details of the deployment is a set of audit tables, including deployment log files and reversal scripts.
- Enable Auditing: Tick the check box to enable auditing.
- Audit Table Name: The name of the audit table can be overridden, otherwise it would be set to [dbo].[ADS_DEPLOYMENT_HISTORY]
[ADS_DEPLOYMENT_HISTORY] CREATE TABLE [dbo].[ADS_DEPLOYMENT_HISTORY] ( ID IDENTITY(1,1) NOT NULL, WORK_ITEM NOT NULL, VERSION NOT NULL, ARTIFACT(50) NOT NULL, DATE_STAMP NOT NULL, LOG_OUTPUT(max) NULL, REVERSAL_ID NULL, [STATUS] char(1) NULL, CONSTRAINT [ADS_DEPLOYMENT_HISTORY_PK] PRIMARY KEY CLUSTERED ([ID] ASC)); Reversal Table Name: The name of the audit table containing the reversal scripts can be overridden, otherwise it wou
Advanced Deployment Options
The following parameters are selectively shown under the Advanced Options:
- Fail on Standard Error: If this is true, this task will fail if any errors are written to the Standard Error stream.