Skip to content

Commit 1f4e9ca

Browse files
authored
Merge pull request #13 from robgrame/feature/azure-native
feat: Azure-native solution (Functions + HybridAgent + Web.Azure + infra) + CI hygiene
2 parents 226d2ac + 249747a commit 1f4e9ca

145 files changed

Lines changed: 70821 additions & 9 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.azure/plan.md

Lines changed: 569 additions & 0 deletions
Large diffs are not rendered by default.

.github/CODEOWNERS

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Code owners — automatic reviewer assignment + subsystem boundary documentation.
2+
# Last matching rule wins.
3+
#
4+
# When multi-maintainer ownership lands, replace @robgrame with the appropriate
5+
# team handle (e.g. @org/azure-stack-maintainers) per section.
6+
7+
# Default fallback — anything not matched below.
8+
* @robgrame
9+
10+
# --- Shared spine -----------------------------------------------------------
11+
# Changes here impact BOTH on-prem and Azure stacks. Treat as high-risk.
12+
# build-onprem.yml and build-azure.yml both fire on Core path changes
13+
# (see .github/workflows/build-{onprem,azure}.yml).
14+
/src/BitLockerKeyMonitor.Core/ @robgrame
15+
/tests/BitLockerKeyMonitor.Core.Tests/ @robgrame
16+
/Directory.Build.props @robgrame
17+
/docs/FEATURE-PARITY.md @robgrame
18+
19+
# --- On-prem stack (frozen production: Worker + Web) -----------------------
20+
# Per repo convention these projects are deployed on Windows servers and must
21+
# NOT change unless a PR explicitly targets the on-prem solution.
22+
/src/BitLockerKeyMonitor.Worker/ @robgrame
23+
/src/BitLockerKeyMonitor.Web/ @robgrame
24+
/Deploy-Remote.ps1 @robgrame
25+
26+
# --- Azure-native stack ----------------------------------------------------
27+
/src/BitLockerKeyMonitor.Functions/ @robgrame
28+
/src/BitLockerKeyMonitor.HybridAgent/ @robgrame
29+
/src/BitLockerKeyMonitor.Web.Azure/ @robgrame
30+
/src/BitLockerKeyMonitor.Shared/ @robgrame
31+
/tests/BitLockerKeyMonitor.Functions.Tests/ @robgrame
32+
/tests/BitLockerKeyMonitor.HybridAgent.Tests/ @robgrame
33+
/Deploy-Azure.ps1 @robgrame
34+
/Deploy-HybridAgent.ps1 @robgrame
35+
36+
# --- Infrastructure --------------------------------------------------------
37+
/infra/ @robgrame
38+
39+
# --- CI / tooling ----------------------------------------------------------
40+
/.github/ @robgrame

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Pull Request
2+
3+
## Summary
4+
5+
<!-- What does this PR change, and why? -->
6+
7+
## Type of change
8+
9+
- [ ] Bug fix
10+
- [ ] New feature
11+
- [ ] Refactor / cleanup
12+
- [ ] Documentation
13+
- [ ] Infrastructure / CI
14+
- [ ] Dependency update
15+
16+
## Affected solution(s)
17+
18+
- [ ] `BitLockerKeyMonitor.slnx` (on-prem: Worker + Web + Core)
19+
- [ ] `BitLockerKeyMonitor.Azure.slnx` (Azure: Functions + HybridAgent + Web.Azure + Core)
20+
- [ ] Shared `BitLockerKeyMonitor.Core` (impacts BOTH solutions)
21+
22+
## Feature parity check (required when affecting one side only)
23+
24+
If this PR adds or modifies a feature in **one solution only**:
25+
26+
- [ ] Updated `docs/FEATURE-PARITY.md` with the new/changed row.
27+
- [ ] Marked the **other** solution column as `` (planned) and opened a tracking issue, OR justified `` (not applicable) in the notes column.
28+
- [ ] No change to `src/BitLockerKeyMonitor.Worker/` or `src/BitLockerKeyMonitor.Web/` (frozen on-prem assemblies) **unless** this PR explicitly targets the on-prem solution.
29+
- [ ] Any change to `BitLockerKeyMonitor.Core` is **additive and backward-compatible** (no breaking changes to public API consumed by Worker/Web).
30+
31+
## Validation
32+
33+
- [ ] `dotnet build .\BitLockerKeyMonitor.slnx` — passes locally
34+
- [ ] `dotnet build .\BitLockerKeyMonitor.Azure.slnx` — passes locally
35+
- [ ] `dotnet test .\BitLockerKeyMonitor.slnx` — passes locally
36+
- [ ] CI `build-onprem` green (auto-triggered when on-prem or Core paths change)
37+
- [ ] CI `build-azure` green (auto-triggered when Azure or Core paths change)
38+
- [ ] `area:*` labels auto-applied by `pr-labeler` workflow are accurate (correct if not — they reflect the affected subsystems)
39+
40+
## Notes / screenshots
41+
42+
<!-- Anything reviewers should know. Link to issues, screenshots, etc. -->

.github/labeler.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# actions/labeler@v5 configuration. Applied automatically by
2+
# .github/workflows/labeler.yml on every pull_request open/synchronize.
3+
4+
'area:azure':
5+
- changed-files:
6+
- any-glob-to-any-file:
7+
- 'src/BitLockerKeyMonitor.Functions/**'
8+
- 'src/BitLockerKeyMonitor.HybridAgent/**'
9+
- 'src/BitLockerKeyMonitor.Web.Azure/**'
10+
- 'src/BitLockerKeyMonitor.Shared/**'
11+
- 'tests/BitLockerKeyMonitor.Functions.Tests/**'
12+
- 'tests/BitLockerKeyMonitor.HybridAgent.Tests/**'
13+
- 'BitLockerKeyMonitor.Azure.slnx'
14+
- 'Deploy-Azure.ps1'
15+
- 'Deploy-HybridAgent.ps1'
16+
17+
'area:on-prem':
18+
- changed-files:
19+
- any-glob-to-any-file:
20+
- 'src/BitLockerKeyMonitor.Worker/**'
21+
- 'src/BitLockerKeyMonitor.Web/**'
22+
- 'BitLockerKeyMonitor.slnx'
23+
- 'Deploy-Remote.ps1'
24+
25+
'area:core':
26+
- changed-files:
27+
- any-glob-to-any-file:
28+
- 'src/BitLockerKeyMonitor.Core/**'
29+
- 'tests/BitLockerKeyMonitor.Core.Tests/**'
30+
- 'Directory.Build.props'
31+
32+
'area:infra':
33+
- changed-files:
34+
- any-glob-to-any-file:
35+
- 'infra/**'
36+
- 'Deploy-Azure.ps1'
37+
- 'Deploy-HybridAgent.ps1'
38+
- 'Deploy-Remote.ps1'
39+
40+
'area:ci':
41+
- changed-files:
42+
- any-glob-to-any-file:
43+
- '.github/**'
44+
45+
'area:docs':
46+
- changed-files:
47+
- any-glob-to-any-file:
48+
- 'docs/**'
49+
- '*.md'

.github/workflows/build-azure.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: build-azure
2+
3+
# Builds the Azure-native solution (Functions + HybridAgent + Web.Azure + Shared + Core)
4+
# and lints the Bicep templates. Triggered ONLY when paths relevant to the Azure
5+
# stack change. The shared Core path is intentionally listed here AND in
6+
# build-onprem.yml so a single Core change exercises BOTH stacks in parallel
7+
# (this replaces the former build-both.yml regression guard).
8+
9+
on:
10+
push:
11+
branches: [master, main, feature/**]
12+
paths:
13+
- 'src/BitLockerKeyMonitor.Functions/**'
14+
- 'src/BitLockerKeyMonitor.HybridAgent/**'
15+
- 'src/BitLockerKeyMonitor.Web.Azure/**'
16+
- 'src/BitLockerKeyMonitor.Shared/**'
17+
- 'src/BitLockerKeyMonitor.Core/**'
18+
- 'tests/BitLockerKeyMonitor.Core.Tests/**'
19+
- 'tests/BitLockerKeyMonitor.Functions.Tests/**'
20+
- 'tests/BitLockerKeyMonitor.HybridAgent.Tests/**'
21+
- 'BitLockerKeyMonitor.Azure.slnx'
22+
- 'Directory.Build.props'
23+
- 'infra/**'
24+
- 'Deploy-Azure.ps1'
25+
- 'Deploy-HybridAgent.ps1'
26+
- '.github/workflows/build-azure.yml'
27+
pull_request:
28+
branches: [master, main]
29+
paths:
30+
- 'src/BitLockerKeyMonitor.Functions/**'
31+
- 'src/BitLockerKeyMonitor.HybridAgent/**'
32+
- 'src/BitLockerKeyMonitor.Web.Azure/**'
33+
- 'src/BitLockerKeyMonitor.Shared/**'
34+
- 'src/BitLockerKeyMonitor.Core/**'
35+
- 'tests/BitLockerKeyMonitor.Core.Tests/**'
36+
- 'tests/BitLockerKeyMonitor.Functions.Tests/**'
37+
- 'tests/BitLockerKeyMonitor.HybridAgent.Tests/**'
38+
- 'BitLockerKeyMonitor.Azure.slnx'
39+
- 'Directory.Build.props'
40+
- 'infra/**'
41+
- 'Deploy-Azure.ps1'
42+
- 'Deploy-HybridAgent.ps1'
43+
- '.github/workflows/build-azure.yml'
44+
45+
jobs:
46+
build:
47+
runs-on: windows-latest
48+
name: Build BitLockerKeyMonitor.Azure.slnx
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- name: Setup .NET 10
53+
uses: actions/setup-dotnet@v4
54+
with:
55+
dotnet-version: '10.0.x'
56+
57+
- name: Restore
58+
run: dotnet restore BitLockerKeyMonitor.Azure.slnx
59+
60+
- name: Build
61+
run: dotnet build BitLockerKeyMonitor.Azure.slnx --no-restore --nologo -v minimal -c Release
62+
63+
- name: Test (Functions + HybridAgent)
64+
run: |
65+
dotnet test tests/BitLockerKeyMonitor.Functions.Tests/BitLockerKeyMonitor.Functions.Tests.csproj --no-build --no-restore --verbosity minimal -c Release
66+
dotnet test tests/BitLockerKeyMonitor.HybridAgent.Tests/BitLockerKeyMonitor.HybridAgent.Tests.csproj --no-build --no-restore --verbosity minimal -c Release
67+
68+
bicep-lint:
69+
runs-on: ubuntu-latest
70+
name: Bicep build + lint
71+
steps:
72+
- uses: actions/checkout@v4
73+
74+
- name: Install Bicep CLI
75+
run: |
76+
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
77+
chmod +x ./bicep
78+
sudo mv ./bicep /usr/local/bin/bicep
79+
bicep --version
80+
81+
- name: Build Bicep (lint + compile)
82+
run: bicep build infra/main.bicep --outdir ./bicep-out

.github/workflows/build-onprem.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: build-onprem
2+
3+
# Builds the on-prem solution (Worker + Web + Core). Triggered ONLY when paths
4+
# relevant to that stack change. The shared Core path is intentionally listed
5+
# here AND in build-azure.yml so a single Core change exercises BOTH stacks in
6+
# parallel (this replaces the former build-both.yml regression guard).
7+
8+
on:
9+
push:
10+
branches: [master, main, feature/**]
11+
paths:
12+
- 'src/BitLockerKeyMonitor.Worker/**'
13+
- 'src/BitLockerKeyMonitor.Web/**'
14+
- 'src/BitLockerKeyMonitor.Core/**'
15+
- 'tests/BitLockerKeyMonitor.Core.Tests/**'
16+
- 'BitLockerKeyMonitor.slnx'
17+
- 'Directory.Build.props'
18+
- 'Deploy-Remote.ps1'
19+
- '.github/workflows/build-onprem.yml'
20+
pull_request:
21+
branches: [master, main]
22+
paths:
23+
- 'src/BitLockerKeyMonitor.Worker/**'
24+
- 'src/BitLockerKeyMonitor.Web/**'
25+
- 'src/BitLockerKeyMonitor.Core/**'
26+
- 'tests/BitLockerKeyMonitor.Core.Tests/**'
27+
- 'BitLockerKeyMonitor.slnx'
28+
- 'Directory.Build.props'
29+
- 'Deploy-Remote.ps1'
30+
- '.github/workflows/build-onprem.yml'
31+
32+
jobs:
33+
build:
34+
runs-on: windows-latest
35+
name: Build BitLockerKeyMonitor.slnx
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Setup .NET 10
40+
uses: actions/setup-dotnet@v4
41+
with:
42+
dotnet-version: '10.0.x'
43+
44+
- name: Restore
45+
run: dotnet restore BitLockerKeyMonitor.slnx
46+
47+
- name: Build
48+
run: dotnet build BitLockerKeyMonitor.slnx --no-restore --nologo -v minimal -c Release
49+
50+
- name: Test (Core)
51+
run: dotnet test BitLockerKeyMonitor.slnx --no-build --no-restore --verbosity minimal -c Release

.github/workflows/labeler.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: pr-labeler
2+
3+
# Auto-applies area:* labels to PRs based on changed paths. Configuration in
4+
# .github/labeler.yml. The labels must already exist in the repo Settings ->
5+
# Labels (area:azure, area:on-prem, area:core, area:infra, area:ci, area:docs);
6+
# the action will fail-soft if a label is missing.
7+
8+
on:
9+
pull_request_target:
10+
types: [opened, synchronize, reopened]
11+
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
16+
jobs:
17+
label:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/labeler@v5
21+
with:
22+
sync-labels: true

BitLockerKeyMonitor.Azure.slnx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Solution>
2+
<Folder Name="/src/">
3+
<Project Path="src/BitLockerKeyMonitor.Core/BitLockerKeyMonitor.Core.csproj" />
4+
<Project Path="src/BitLockerKeyMonitor.Shared/BitLockerKeyMonitor.Shared.csproj" />
5+
<Project Path="src/BitLockerKeyMonitor.Functions/BitLockerKeyMonitor.Functions.csproj" />
6+
<Project Path="src/BitLockerKeyMonitor.HybridAgent/BitLockerKeyMonitor.HybridAgent.csproj" />
7+
<Project Path="src/BitLockerKeyMonitor.Web.Azure/BitLockerKeyMonitor.Web.Azure.csproj" />
8+
</Folder>
9+
<Folder Name="/tests/">
10+
<Project Path="tests/BitLockerKeyMonitor.Core.Tests/BitLockerKeyMonitor.Core.Tests.csproj" />
11+
<Project Path="tests/BitLockerKeyMonitor.Functions.Tests/BitLockerKeyMonitor.Functions.Tests.csproj" />
12+
<Project Path="tests/BitLockerKeyMonitor.HybridAgent.Tests/BitLockerKeyMonitor.HybridAgent.Tests.csproj" />
13+
</Folder>
14+
</Solution>

0 commit comments

Comments
 (0)