The Build task

Synopsis

Builds a database on a server.

Description

The Build task involves building a database package and deploying it on a specific server. This package is typically created from a script folder containing SQL or other database-related files.

How to create the Build task

This topic assumes that you have already created an Azure pipeline and now need to add the Build task using the dbForge DevOps Automation Azure DevOps plugin for SQL Server.

To create the Build task, select Build and click Add:

Then, specify if your database source project is located in repository root or subfolder. Also, you need to configure the server name, the database name, and the connection parameters.

Verify that the settings are correct by clicking Save & queue.

Open the pipeline execution log. A green icon in the execution log indicates that the task was completed successfully.

Customization options

  • Database folder

Select whether the database source project is located in the repository’s root directory or within a subfolder path.

  • SQL Server

Enter target database server. E.g. SERVERNAME\INSTANCENAME. For local default instance use ‘(local).’

  • Database

Enter the target database name.

  • Authentication method

Select the Authentication method, either SQL Server authentication or Windows authentication.

  • User Name

Enter the login name to use for SQL Server authentication.

  • Password

Enter the password to use for SQL Server authentication.

Additional options

  • Schema Compare options

Specify additional Schema Compare options.

  • Schema Compare filter

Specify a path to an alternative filter file which will be used for validating the schema to override *.scflt filter file present in the input.

Control Options

  • Enabled

Select to enable the task in your pipeline. If a task is disabled, it will be skipped during the pipeline execution.

  • Continue on error

Select to continue the pipeline running even if this task fails.

  • Number of retries if task failed

Specify the number of retries for this task that will happen in case of task failure.

Note

This requires agent version 2.194.0 or later. Not supported for agentless tasks.

  • Timeout

Specify the maximum time, in minutes, that a task is allowed to execute before being canceled by server. A zero value indicates an infinite timeout.

  • Run this task

Specify when this task should run. Choose Custom conditions to specify more complex conditions.

Here you can select from the following options:

  • Only when all previous tasks have succeeded
  • Even if a previous task has failed, unless the build was canceled
  • Even if a previous task has failed, even if the build was canceled
  • Only when a previous task has failed
  • Custom conditions

Output Variables

  • Reference name

Any changes to the reference name will require updates to downstream tasks that uses this reference name, a valid reference name can only contain ‘a-z’, ‘A-Z’, ‘0-9’ and ‘_’.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge DevOps Automation for SQL Server.
Request a demo

Request a demo

If you consider employing the DevOps Automation for your business, request a demo to see it in action.
Ready to start using dbForge DevOps Automation for SQL Server?