dbForge DevOps Automation for SQL Server is a solution designed for the management and deployment of changes to a SQL Server database. With dbForge DevOps Automation for SQL Server, you can automate the deployment of database changes and build a full-cycle database CI/CD pipeline using any continuous integration or continuous deployment server that supports running PowerShell. To simplify setup, dbForge DevOps Automation includes plugins for TeamCity automation servers.
dbForge DevOps Automation comes as part of the SQL Tools suite and is used in conjunction with dbForge Studio or other dbForge tools, such as Unit Test, Data Generator, Data and Schema Compare, etc. dbForge DevOps Automation allows organizing a comprehensive continuous delivery pipeline for your database.
TeamCity Server is a continuous integration (CI) server, a solution that automates and manages the main team development processes (including test execution), analyzes the source code and the code changes integration, manages builds, or generates reports. TeamCity accelerates the database development process and ensures effective interaction between team members.
TeamCity allows you to set up an efficient workflow to organize the CI process.
Note
You can integrate DevOps Automation into TeamCity servers starting from version 2019.1.3.
The guide provides step-by-step procedures about how to create the TeamCity project using the dbForge DevOps Automation TeamCity plugin for SQL Server.
1. Navigate to the TeamCity dashboard.
2. In the left navigation menu, click Admin.
3. Under Server Administration, select Plugins.
4. Click Browse plugins repository to install the plugin directly from the plugin repository, then click Proceed.

5. In the search box, enter dbforge, then select dbForge DevOps Automation for SQL Server.

6. On the page that appears, click Get, then select Install to [your TeamCity server URL].

7. Click Install to confirm the installation.

The plugin is now available on your TeamCity server.
8. On the Plugins page, click Enable uploaded plugins.
Alternatively, on the Plugins page, go to the External plugins section and click the arrow > Enable for the required plugin. To confirm the action, click Enable.

1. In the left navigation menu, click Projects.
2. On the Projects page, click Create Project.

3. On the New Project page, specify the project name and optional description, then click Create.
Note
Project ID is automatically generated from the project name. To change the project ID, use a different name.

4. On the New connection page, configure the version control system settings, then click Proceed.

TeamCity will check the version control system settings you’ve entered.
5. Click Create.

6. The Build page opens, where you can configure the project settings.
Build configurations represent CI/CD routines.
Tip
To open the build configurations page, in the left navigation menu, select Projects, then under your project, click Build. In the top right corner, use the Settings toggle to switch to editing mode.

The basic logic of the CI process is configured in the Build Steps section by adding various build steps. Below is a simple example of how to configure a CI process using dbForge DevOps Automation for SQL Server.
To build a database package step, use dbForge DevOps Automation for SQL Server – Build.
This step validates the SQL scripts located in your version control system by deploying them on the specified server.

To create the Test step, use dbForge DevOps Automation for SQL Server – Test.
This step validates the SQL scripts by running tSQLt unit tests on the specified server.

To create the Sync step, use dbForge DevOps Automation for SQL Server – Sync.
This step synchronizes the generated and tested NuGet package with the specified server.

To create the Execute step, use dbForge DevOps Automation for SQL Server – Execute.
This step inserts data into the specified database by executing the INSERT statements defined in the SQL file.

After the project is configured, you can see the output results. By default, the project is automatically placed into the build queue after TeamCity detects new changes in the repository that is mapped to the project.
To start the project manually, click Run.

After that, the project is added to the build queue. The build starts when a compatible agent becomes available.

When the project is built, its status is displayed on the dashboard.

On the Build Log tab, you can monitor the build process in real-time and view the output result. You can expand the step and view its information.

The log shows the following information: updates to source code from the version control system, creation of a temporary directory, details of each build step execution, and the publishing of artifacts.
You can also download the artifact on the Artifacts tab.

Watch these videos to learn how the dbForge tools can be involved in the Continuous Integration process.