---
title: "CI/CD pipeline architecture | Grafana Labs"
description: "What runs on a pull request and what runs after merge"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

## CI/CD pipeline flow

You can commit dashboard JSON by hand after every SDK change, but that still depends on someone remembering to regenerate and push. A CI/CD pipeline removes that bottleneck.

This diagram shows one end-to-end flow from code change to a live dashboard when Git Sync is already connected to the repository.

[Diagram showing CI/CD pipeline: on pull request, code flows through generate, JSON check, and PR review; on merge to main, Git Sync updates Grafana](pipeline-flow.svg "Diagram showing CI/CD pipeline: on pull request, code flows through generate, JSON check, and PR review; on merge to main, Git Sync updates Grafana")

## What each stage does

| Stage                   | Trigger                          | Action                                                                                                           |
|-------------------------|----------------------------------|------------------------------------------------------------------------------------------------------------------|
| **Generate**            | Every push and pull request      | Run Foundation SDK code and produce dashboard JSON                                                               |
| **JSON check / review** | Pull request                     | Confirm the generated JSON is what the PR intends to merge (for example fail if committed files are out of date) |
| **Git Sync**            | After merge to the synced branch | Grafana polls or receives a webhook and updates provisioned dashboards from Git                                  |

## When each path runs

- **On a pull request:** the pipeline regenerates JSON and gives reviewers a chance to inspect the file changes before merge. Nothing needs to talk to the Grafana API for that review gate.
- **On merge to main** (or whichever branch Git Sync watches): the merged JSON is in the repository, and Git Sync brings Grafana in line with Git.

The Foundation SDK still only generates files. Git Sync remains the sync step you set up in Grafana.
