Skip to content

Commit c06ef7d

Browse files
authored
Merge pull request #2235 from DuendeSoftware/mb/mcp
Documentation MCP server
2 parents e5754be + faf7e19 commit c06ef7d

30 files changed

+1647
-77
lines changed

.github/workflow-gen/Program.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
"bff",
1818
["Bff.Tests"],
1919
["Hosts.Tests"]),
20+
new("docs-mcp",
21+
"docs-mcp.slnf",
22+
"dmcp",
23+
[],
24+
[]),
2025
new("identity-server",
2126
"identity-server.slnf",
2227
"is",
@@ -171,15 +176,17 @@ void GenerateCiWorkflow(Product product)
171176
codeQlJob.Step()
172177
.ActionsCheckout();
173178

174-
codeQlJob.StepInitializeCodeQl();
179+
// Uncomment once https://github.com/github/codeql-action/issues/3207#issuecomment-3405956414 has been resolved
180+
181+
/*codeQlJob.StepInitializeCodeQl();
175182
176183
codeQlJob.StepSetupDotNet();
177184
178185
codeQlJob.StepRestore(product.Solution);
179186
180187
codeQlJob.StepBuild(product.Solution);
181188
182-
codeQlJob.StepPerformCodeQlAnalysis();
189+
codeQlJob.StepPerformCodeQlAnalysis();*/
183190

184191
// Pack
185192
var packJob = workflow

.github/workflows/aspnetcore-authentication-jwtbearer-ci.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ jobs:
128128
fetch-depth: 0
129129
codeql:
130130
name: CodeQL analyze
131-
# Remove once https://github.com/github/codeql-action/issues/3207#issuecomment-3405956414 has been resolved
132-
if: false && ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch'))
131+
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
133132
runs-on:
134133
group: large
135134
labels: [ubuntu-latest-x64-16core]
@@ -142,31 +141,6 @@ jobs:
142141
uses: actions/checkout@v4
143142
with:
144143
fetch-depth: 0
145-
- name: Initialize CodeQL
146-
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
147-
with:
148-
languages: csharp
149-
build-mode: manual
150-
db-location: ~/.codeql/databases
151-
debug: true
152-
- name: List .net sdks
153-
run: dotnet --list-sdks
154-
- name: Setup Dotnet
155-
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
156-
with:
157-
dotnet-version: |-
158-
8.0.x
159-
9.0.203
160-
10.0.100-rc.2.25502.107
161-
- name: Restore
162-
run: dotnet restore aspnetcore-authentication-jwtbearer.slnf
163-
- name: Build
164-
run: dotnet build aspnetcore-authentication-jwtbearer.slnf --no-restore --no-incremental -c Release
165-
- name: Perform CodeQL Analysis
166-
if: ${{ env.DISABLE_CODEQL_ANALYSIS != 'true' }}
167-
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
168-
with:
169-
category: /language:csharp
170144
pack:
171145
name: Pack, sign and push
172146
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')

.github/workflows/bff-ci.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -188,30 +188,6 @@ jobs:
188188
uses: actions/checkout@v4
189189
with:
190190
fetch-depth: 0
191-
- name: Initialize CodeQL
192-
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
193-
with:
194-
languages: csharp
195-
build-mode: manual
196-
db-location: ~/.codeql/databases
197-
- name: List .net sdks
198-
run: dotnet --list-sdks
199-
- name: Setup Dotnet
200-
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
201-
with:
202-
dotnet-version: |-
203-
8.0.x
204-
9.0.203
205-
10.0.100-rc.2.25502.107
206-
- name: Restore
207-
run: dotnet restore bff.slnf
208-
- name: Build
209-
run: dotnet build bff.slnf --no-restore -c Release
210-
- name: Perform CodeQL Analysis
211-
if: ${{ env.DISABLE_CODEQL_ANALYSIS != 'true' }}
212-
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
213-
with:
214-
category: /language:csharp
215191
pack:
216192
name: Pack, sign and push
217193
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')

.github/workflows/docs-mcp-ci.yml

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# This was generated by tool. Edits will be overwritten.
2+
3+
name: docs-mcp/ci
4+
on:
5+
workflow_dispatch:
6+
push:
7+
paths:
8+
- .config/dotnet-tools.json
9+
- .github/workflows/docs-mcp-**
10+
- docs-mcp/**
11+
- .editorconfig
12+
- Directory.Packages.props
13+
- global.json
14+
- src.props
15+
- test.props
16+
pull_request:
17+
paths:
18+
- .config/dotnet-tools.json
19+
- .github/workflows/docs-mcp-**
20+
- docs-mcp/**
21+
- .editorconfig
22+
- Directory.Packages.props
23+
- global.json
24+
- src.props
25+
- test.props
26+
env:
27+
DOTNET_NOLOGO: true
28+
DOTNET_CLI_TELEMETRY_OPTOUT: true
29+
jobs:
30+
verify-formatting:
31+
name: Verify formatting
32+
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
33+
runs-on:
34+
group: large
35+
labels: [ubuntu-latest-x64-16core]
36+
permissions:
37+
contents: read
38+
defaults:
39+
run:
40+
shell: bash
41+
working-directory: docs-mcp
42+
timeout-minutes: 15
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0
48+
- name: List .net sdks
49+
run: dotnet --list-sdks
50+
- name: Setup Dotnet
51+
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
52+
with:
53+
dotnet-version: |-
54+
8.0.x
55+
9.0.203
56+
10.0.100-rc.2.25502.107
57+
- name: Restore
58+
run: dotnet restore docs-mcp.slnf
59+
- name: Verify Formatting
60+
run: dotnet format docs-mcp.slnf --verify-no-changes --no-restore
61+
build:
62+
name: Build and test (unit)
63+
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
64+
runs-on: ubuntu-latest
65+
permissions:
66+
actions: read
67+
checks: write
68+
contents: read
69+
packages: write
70+
defaults:
71+
run:
72+
shell: bash
73+
working-directory: docs-mcp
74+
timeout-minutes: 15
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v4
78+
with:
79+
fetch-depth: 0
80+
- name: List .net sdks
81+
run: dotnet --list-sdks
82+
- name: Setup Dotnet
83+
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
84+
with:
85+
dotnet-version: |-
86+
8.0.x
87+
9.0.203
88+
10.0.100-rc.2.25502.107
89+
- name: Restore
90+
run: dotnet restore docs-mcp.slnf
91+
- name: Build
92+
run: dotnet build docs-mcp.slnf --no-restore -c Release
93+
- name: Dotnet devcerts
94+
run: dotnet dev-certs https --trust
95+
playwright:
96+
name: Playwright tests
97+
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
98+
runs-on:
99+
group: large
100+
labels: [ubuntu-latest-x64-16core]
101+
permissions:
102+
actions: read
103+
checks: write
104+
contents: read
105+
defaults:
106+
run:
107+
shell: bash
108+
working-directory: docs-mcp
109+
timeout-minutes: 15
110+
steps:
111+
- name: Checkout
112+
uses: actions/checkout@v4
113+
with:
114+
fetch-depth: 0
115+
codeql:
116+
name: CodeQL analyze
117+
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
118+
runs-on:
119+
group: large
120+
labels: [ubuntu-latest-x64-16core]
121+
defaults:
122+
run:
123+
shell: bash
124+
working-directory: docs-mcp
125+
steps:
126+
- name: Checkout
127+
uses: actions/checkout@v4
128+
with:
129+
fetch-depth: 0
130+
pack:
131+
name: Pack, sign and push
132+
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
133+
needs:
134+
- verify-formatting
135+
- build
136+
- playwright
137+
- codeql
138+
runs-on:
139+
group: large
140+
labels: [ubuntu-latest-x64-16core]
141+
permissions:
142+
actions: read
143+
contents: read
144+
packages: write
145+
defaults:
146+
run:
147+
shell: bash
148+
working-directory: docs-mcp
149+
timeout-minutes: 15
150+
steps:
151+
- name: Checkout
152+
uses: actions/checkout@v4
153+
with:
154+
fetch-depth: 0
155+
- name: List .net sdks
156+
run: dotnet --list-sdks
157+
- name: Setup Dotnet
158+
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
159+
with:
160+
dotnet-version: |-
161+
8.0.x
162+
9.0.203
163+
10.0.100-rc.2.25502.107
164+
- name: Tool restore
165+
run: dotnet tool restore
166+
- name: Pack docs-mcp.slnf
167+
run: dotnet pack -c Release docs-mcp.slnf -o artifacts
168+
- name: Sign packages
169+
if: github.event == 'push'
170+
run: |-
171+
for file in artifacts/*.nupkg; do
172+
dotnet NuGetKeyVaultSignTool sign "$file" --file-digest sha256 --timestamp-rfc3161 http://timestamp.digicert.com --azure-key-vault-url https://duendecodesigninghsm.vault.azure.net/ --azure-key-vault-client-id 18e3de68-2556-4345-8076-a46fad79e474 --azure-key-vault-tenant-id ed3089f0-5401-4758-90eb-066124e2d907 --azure-key-vault-client-secret ${{ secrets.SignClientSecret }} --azure-key-vault-certificate NuGetPackageSigning
173+
done
174+
- name: Push packages to GitHub
175+
if: github.ref == 'refs/heads/main'
176+
run: dotnet nuget push artifacts/*.nupkg --source https://nuget.pkg.github.com/DuendeSoftware/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
177+
env:
178+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
179+
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180+
- name: Upload Artifacts
181+
if: github.ref == 'refs/heads/main'
182+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
183+
with:
184+
name: artifacts
185+
path: docs-mcp/artifacts/*.nupkg
186+
overwrite: true
187+
retention-days: 15

0 commit comments

Comments
 (0)