Skip to content

Commit 8fa6f0b

Browse files
Merge pull request #11 from michaeldeongreen/test
promote: test to main (governance doc rename + CI gate fix)
2 parents 0884c43 + 760df7b commit 8fa6f0b

9 files changed

Lines changed: 141 additions & 19 deletions

.github/workflows/check-pr-ready.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Check PR Ready
33
on:
44
pull_request:
55
branches: [dev]
6-
paths: ["data/fabric/**"]
76

87
permissions:
98
contents: read
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Enforce Promotion Path
2+
3+
on:
4+
pull_request:
5+
branches: [test, main]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
enforce-promotion-path:
12+
name: Enforce promotion path
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 1
15+
steps:
16+
- name: Verify PR source branch
17+
run: |
18+
BASE="${{ github.base_ref }}"
19+
HEAD="${{ github.head_ref }}"
20+
echo "PR: $HEAD -> $BASE"
21+
case "$BASE" in
22+
test)
23+
if [[ "$HEAD" != "dev" ]]; then
24+
echo "::error::PRs into 'test' must originate from 'dev'. Got '$HEAD'."
25+
exit 1
26+
fi
27+
;;
28+
main)
29+
if [[ "$HEAD" != "test" ]]; then
30+
echo "::error::PRs into 'main' must originate from 'test'. Got '$HEAD'."
31+
exit 1
32+
fi
33+
;;
34+
*)
35+
echo "Branch '$BASE' has no promotion-path restriction."
36+
;;
37+
esac
38+
echo "Source branch '$HEAD' is valid for target '$BASE'."

.github/workflows/run-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Run Tests
22

33
on:
44
pull_request:
5-
paths:
6-
- "scripts/**"
7-
- "tests/**"
85

96
permissions:
107
contents: read

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
# Microsoft Fabric SDLC Patterns
22

3-
A reference implementation for CI/CD in Microsoft Fabric, demonstrating how to version-control, deploy, and manage Fabric workspace items across dev, test, and production environments using GitHub Actions and the [fabric-cicd](https://microsoft.github.io/fabric-cicd) Python library.
3+
A reference implementation and solution accelerator for the developer workflow and CI/CD pipeline in Microsoft Fabric, demonstrating how to choose a release strategy, implement deployments, work day-to-day on feature branches, and govern the pipeline for dev, test, and production using GitHub Actions and the [fabric-cicd](https://microsoft.github.io/fabric-cicd) Python library. Both the developer workflow and the deployment pipeline are fully implemented end-to-end so the repo runs as a complete reference, not isolated examples.
4+
5+
*Based on field experience with Microsoft Fabric customers and partners. Opinions expressed here are my own and do not represent Microsoft's official guidance.*
46

57
---
68

79
## Who is this for?
810

9-
Teams and engineers who need to establish a reliable software development lifecycle (SDLC) for Microsoft Fabric — including automated deployments, environment-specific configuration, and Git-based version control for Fabric items.
11+
Engineers and platform teams responsible for getting Microsoft Fabric workloads from a developer's laptop to production safely and repeatably — covering the developer workflow, the deployment pipeline itself, and the governance layered on top.
12+
13+
Architects and decision-makers evaluating Fabric will also find the [CI/CD Release Options](fabric-cicd-release-options.md) and [Governance Considerations](fabric-cicd-governance-considerations.md) useful for understanding the operating model before committing.
1014

1115
---
1216

1317
## Architecture
1418

1519
```
20+
Feature branch (feature/*)
21+
22+
│ PR → dev branch
23+
1624
Git repo (dev branch)
1725
18-
│ PR merge → test branch
26+
│ PR merge → test branch (source must be dev)
1927
2028
┌──────────────────────────────────────────────┐
2129
│ deploy-test.yml │
@@ -25,7 +33,7 @@ Git repo (dev branch)
2533
│ └─ Fabric REST API: run notebook │
2634
└──────────────────────────────────────────────┘
2735
28-
│ PR merge → main branch
36+
│ PR merge → main branch (source must be test)
2937
3038
┌──────────────────────────────────────────────┐
3139
│ deploy-prod.yml │
@@ -36,6 +44,8 @@ Git repo (dev branch)
3644
└──────────────────────────────────────────────┘
3745
```
3846

47+
Branch protection (PR required, source-branch restrictions, status checks) is enforced by GitHub branch rulesets and the [enforce-promotion-path.yml](.github/workflows/enforce-promotion-path.yml) workflow — see the [Governance Considerations](fabric-cicd-governance-considerations.md).
48+
3949
![Hybrid Recommendation Flow](assets/hybrid-recommendation-flow.svg)
4050

4151
---
@@ -47,6 +57,7 @@ Git repo (dev branch)
4757
| [CI/CD Release Options](fabric-cicd-release-options.md) | Evaluates all CI/CD release options for Fabric (Deployment Pipelines, Git-based, Build-based, Hybrid) and recommends the Hybrid approach. **Start here** if you're deciding on a strategy. |
4858
| [Hybrid CI/CD Implementation Guide](fabric-hybrid-cicd-guide.md) | Deep dive into the implementation: workflow structure, configuration strategy, prerequisites, setup steps, and gotchas. |
4959
| [Development Process](fabric-development-process.md) | How developers work day-to-day: branch-out workflow, the workspace swap script, and PR readiness check. |
60+
| [CI/CD Governance Considerations](fabric-cicd-governance-considerations.md) | Considerations on identities, RBAC, branch protection, and approval gates for the CI/CD pipeline. Includes pointers to adjacent controls owned outside the pipeline (security/compliance topics). |
5061

5162
---
5263

@@ -89,17 +100,17 @@ When designing your development and CI/CD processes, identify which items in you
89100
2. **Three Fabric Workspaces** — Dev (Git-connected), Test, and Prod
90101
3. **Service Principal** — With Contributor role on Test and Prod workspaces
91102
4. **GitHub Environments**`Test` and `Prod` with environment-scoped secrets
92-
5. **Fabric Admin Setting**"Service principals can use Fabric APIs" enabled
103+
5. **Fabric Admin Setting** — Service principal access to Fabric APIs enabled in the Fabric Admin portal under Developer settings (see [developer tenant settings](https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-developer))
93104

94105
### Setup
95106

96107
1. Create a Service Principal and add it as Contributor on Test and Prod workspaces
97-
2. Create GitHub Environments (`Test`, `Prod`) with secrets: `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `FABRIC_WORKSPACE_ID`
108+
2. Create GitHub Environments (`Test`, `Prod`) with secrets: `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `FABRIC_WORKSPACE_ID` *(this demo uses a client secret for simplicity; for production, evaluate [GitHub OIDC federation](fabric-cicd-governance-considerations.md#identity-model--pick-the-right-identity-for-the-job) to remove the stored secret)*
98109
3. Connect the Dev workspace to the `dev` branch via Fabric Git integration (folder: `data/fabric/`)
99110
4. Create `dev`, `test`, and `main` branches
100111
5. Develop on `dev`, merge to `test` (triggers Test deploy), merge to `main` (triggers Prod deploy)
101112

102-
For detailed setup instructions, see the [Implementation Guide](fabric-hybrid-cicd-guide.md#prerequisites--setup).
113+
For detailed setup instructions, see the [Implementation Guide](fabric-hybrid-cicd-guide.md#prerequisites--setup). For branch-protection rulesets, deploy-time approvals, and the source-branch promotion path enforced in this repo, see the [Governance Considerations](fabric-cicd-governance-considerations.md).
103114

104115
---
105116

assets/development-swap-to-dev-flow.svg

Lines changed: 1 addition & 2 deletions
Loading

0 commit comments

Comments
 (0)