-
Notifications
You must be signed in to change notification settings - Fork 465
Use ESRP to release server.json files #2359
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
| 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@11 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] This ESRP task runs in a regular Consider switching to |
||
| displayName: Publish server.json to MCP Repository | ||
| 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 | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
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.
[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.