-
Notifications
You must be signed in to change notification settings - Fork 230
Update build scripts to use common metadata file #534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
11811f5
to
43e55ed
Compare
107bb97
to
0e55b21
Compare
0e55b21
to
38feff4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR centralizes build configuration by introducing a build_info.json
file that coordinates version numbers, package properties, and platform details across all build artifacts. The changes replace static build matrices with dynamically generated ones and update pack scripts to be server-generic.
- Updates all build, test, package and release scripts to use a common
build_info.json
file - Removes static build matrices in favor of dynamically generated ones from the build info
- Converts pack scripts to be server-generic by pulling configuration from build_info.json
Reviewed Changes
Copilot reviewed 33 out of 36 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
servers//src/.csproj | Reorganized packaging properties into consistent sections (npm, docker, dnx/nuget, vsix) |
eng/scripts/New-BuildInfo.ps1 | New script that generates the centralized build_info.json configuration file |
eng/scripts/Build-Code.ps1 | Updated to use build_info.json instead of individual project properties |
eng/scripts/Pack-*.ps1 | Refactored packaging scripts to read from build_info.json for server-agnostic configuration |
eng/pipelines/ | Updated pipeline templates to use dynamic matrices from build_info.json |
eng/scripts/helpers/PathHelpers.ps1 | New helper for repository path utilities |
I'll add a followup PR |
af781a5
to
d186241
Compare
3af3798
to
89e3351
Compare
|
||
$version = $serverInfo.version | ||
Write-Host "Setting variable DockerImageVersion to $version" | ||
Write-Host "##vso[task.setvariable variable=DockerImageVersion;isOutput=true]$version" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Do these need to be output variables now?
$platformSourcePath = "$RepoRoot/eng/npm/platform" | ||
|
||
# When running locally, ignore missing artifacts instead of failing | ||
$ignoreMissingArtifacts = $env:TF_BUILD -ne 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think we have shared function for this in common.
- task: Powershell@2 | ||
displayName: "Create build info file" | ||
name: CreateBuildInfo | ||
condition: and(succeeded(), ne(variables['NoPackagesChanged'],'true')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not need an empty build_info if NoPackagesChanged is set?
ServerName: ${{ parameters.ServerName }} | ||
MatrixConfigs: | ||
- Name: build_matrix | ||
Path: eng/pipelines/build-matrix.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matrix no longer exists. You will need to try to share the matrix of the build.
Write-Host "Building version $version, $os-$arch in $outputDir" -ForegroundColor Green | ||
foreach ($os in $OperatingSystem) { | ||
foreach ($arch in $Architecture) { | ||
$platform = $server.platforms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might need to check that $platform
is not empty or contains more than one entry.
if ($CleanBuild) { | ||
# Clean up any previous build artifacts. | ||
Write-Host "Removing existing bin and obj folders" | ||
Remove-Item * -Recurse -Include 'obj', 'bin' -Force -ProgressAction SilentlyContinue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why clean this way? I would call "dotnet clean" or "dotnet rebuild"
"." | ||
) | ||
|
||
Invoke-LoggedCommand "docker build $($dockerArgs -join ' ')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should handle the error code on these calls.
What does this PR do?
Sample build_info.json
GitHub issue number?
closes #53
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.md
and/orservers/Fabric.Mcp.Server/CHANGELOG.md
for product changes (features, bug fixes, UI/UX, updated dependencies
)servers/Azure.Mcp.Server/README.md
and/orservers/Fabric.Mcp.Server/README.md
documentation/docs/azmcp-commands.md
and/or/docs/fabric-commands.md
ToolDescriptionEvaluator
and obtained a score of0.4
or more and a top 3 ranking for all related test prompts/docs/e2eTestPrompts.md
crypto mining, spam, data exfiltration, etc.
)/azp run mcp - pullrequest - live
to run Live Test Pipeline