Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,39 @@ jobs:
-BuildInfoPath '$(Pipeline.Workspace)/build_info/build_info.json'
-NuGetFeedIndexUrl '${{ parameters.NuGetFeedIndexUrl }}'

- task: AzureCLI@2
displayName: 'Build go tool and publish server.json'
- pwsh: |
$serverJsonPath = '$(Pipeline.Workspace)/build_info/${{ parameters.ServerName }}/server.json'
Write-Host "Contents of server.json before staging:"
Get-Content -Path $serverJsonPath | Write-Host

$stagingDirectory = '$(Build.ArtifactStagingDirectory)'
New-Item -ItemType Directory -Path $stagingDirectory -ErrorAction SilentlyContinue | Out-Null
Copy-Item -Path $serverJsonPath -Destination $stagingDirectory
Copy link
Copy Markdown
Contributor

@jongio jongio Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] Staging server.json directly to $(Build.ArtifactStagingDirectory) root. The pypi release template isolates files into a dedicated subdirectory before handing to ESRP to prevent unintended files from being released. Low risk right now since this is the only copy operation, but a subdirectory would be safer as the job evolves.


Write-Host "Staged server.json to $stagingDirectory"
displayName: 'Stage server.json for release'

- task: 1ES.PublishPipelineArtifact@1
displayName: Publish Server.json artifact
inputs:
azureSubscription: 'Azure SDK Engineering System'
scriptType: 'pscore'
scriptLocation: 'scriptPath'
scriptPath: $(Build.SourcesDirectory)/eng/scripts/Deploy-ServerJson.ps1
arguments: >
-ServerJsonPath: '$(Pipeline.Workspace)/build_info/${{ parameters.ServerName }}/server.json'
-ServerName '${{ parameters.ServerName }}'
-BuildInfoPath '$(Pipeline.Workspace)/build_info/build_info.json'
-KeyVaultName 'azuresdkengkeyvault'
-KeyVaultKeyName 'mcp-registry'
env:
AZURE_TOKEN_CREDENTIALS: 'AzureCLICredential' # Have DefaultAzureCredential use the AzureCLI credential
path: $(Build.ArtifactStagingDirectory)
artifact: server.json_${{ parameters.ServerName }}

- task: ESRPRelease@10
displayName: Publish native platform packages to npmjs.com
inputs:
ConnectedServiceName: 'Azure SDK PME Managed Identity'
ClientId: '5f81938c-2544-4f1f-9251-dd9de5b8a81b'
DomainTenantId: '975f013f-7f24-47e8-a7d3-abc4752bf346'
UseManagedIdentity: true
KeyVaultName: 'kv-azuresdk-codesign'
SignCertName: 'azure-sdk-esrp-release-certificate'
Intent: 'PackageDistribution'
ContentType: 'mcpregistry'
ContentSource: 'Folder'
FolderLocation: '$(Build.ArtifactStagingDirectory)'
Owners: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }}
Approvers: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }}
ServiceEndpointUrl: 'https://api.esrp.microsoft.com'
MainPublisher: 'ESRPRELPACMANTEST'
ProductState: latest
4 changes: 2 additions & 2 deletions eng/pipelines/templates/jobs/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ jobs:
DeploymentEnvironment: 'public'
ServerName: ${{ parameters.ServerName }}
DependsOn: TagRepository

- template: /eng/pipelines/templates/jobs/update-mcp-repository.yml
- template: /eng/pipelines/templates/jobs/mcp-registry/release-server-json.yml
parameters:
ServerName: ${{ parameters.ServerName }}
PackageMCPB: ${{ parameters.PackageMCPB }}
Expand Down
142 changes: 0 additions & 142 deletions eng/scripts/Deploy-ServerJson.ps1

This file was deleted.

Loading
Loading