# Overview

JadeGit provides the ability to [build deployments](https://jadelab.gitbook.io/jadegit/0.15.0/console/build), which may be published/run in different ways.

* Using an automated pipeline on a platform like Azure DevOps to push changes to target databases.  This approach would be suitable in scenarios where all databases can be accessed/managed by the platform (i.e. using [environment resource agents](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/environments-virtual-machines) to manage a database).
* Publishing updates to a feed that can be queried/pulled from by remote databases.  This approach would be suitable in scenarios where there are many databases across client sites which cannot be accessed/managed directly, although publishing to the feed could still be performed by an automated pipeline.

The fundamental steps for building & deploying updates remain the same irrespective of the direction or using an automated process.

1. Retrieve the current commit ID for the database (or feed).
2. Build deployment, supplying current/previous commit ID and latest commit ID.
3. Run deployment against database.
4. Update the current commit ID, ready for retrieval next time.

To publish updates to a feed instead of pushing updates out directly, a staging database could be used to confirm deployments work before they're added to the feed (which could be organized/queried by commit ID).  As it'd represent updates previously published, the current commit ID could be retrieved from the staging database during the first step above.

<img src="https://content.gitbook.com/content/w0jUhdQFxvrpPPdgWBb9/blobs/tTwbEce31h1f73DIt1z6/deploy-pipeline.excalidraw.svg" alt="" class="gitbook-drawing">

The current commit ID for a database may be stored as preferred (i.e. could just be a simple text file), or you may use the JadeGit [registry](https://jadelab.gitbook.io/jadegit/0.15.0/deployment/registry) (recommended).
