Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
17 changes: 4 additions & 13 deletions eng/pipelines/templates/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,10 @@ parameters:
default: false
- name: ServerName
type: string
default: none
default: ''
- name: SkipDockerRelease
type: string
default: false
- name: VsixTargets
type: object
default:
- linux-x64
- linux-arm64
- osx-x64
- osx-arm64
- win-x64
- win-arm64

resources:
repositories:
Expand Down Expand Up @@ -73,8 +64,7 @@ extends:
JobTemplatePath: /eng/pipelines/templates/jobs/build.yml
AdditionalParameters:
TestTimeoutInMinutes: 10
${{ if ne(parameters.ServerName, 'none') }}:
ServerName: ${{ parameters.ServerName }}
ServerName: ${{ parameters.ServerName }}
MatrixConfigs:
- Name: build_matrix
Path: eng/pipelines/build-matrix.json
Expand Down Expand Up @@ -128,10 +118,11 @@ extends:
variables:
- template: /eng/pipelines/templates/variables/image.yml
- template: /eng/pipelines/templates/variables/globals.yml
- name: VersionSuffix
value: $[ stageDependencies.Initialize.Initialize.outputs['GetVersion.VersionSuffix'] ]
jobs:
- template: /eng/pipelines/templates/jobs/release.yml
parameters:
VsixTargets: ${{ parameters.VsixTargets }}
ServerName: ${{ parameters.ServerName }}
IncludeNative: false
SkipDockerRelease: ${{ parameters.SkipDockerRelease }}
Expand Down
3 changes: 1 addition & 2 deletions eng/pipelines/templates/jobs/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ parameters:
type: number
- name: ServerName
type: string
default: ''

jobs:
- job: Build_${{ parameters.OSName }}
Expand Down Expand Up @@ -142,5 +141,5 @@ jobs:
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)
ArtifactName: $(PipelineArtifactName)_$(System.JobName)
ArtifactName: build_$(System.JobName)
SbomEnabled: ${{ ne(variables['Build.Reason'], 'PullRequest') }}
10 changes: 5 additions & 5 deletions eng/pipelines/templates/jobs/docker/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
displayName: 'Download signed packages'
inputs:
buildType: 'current'
artifactName: $(PipelineArtifactName)_signed
artifactName: binaries_signed
targetPath: $(Build.ArtifactStagingDirectory)

- task: CopyFiles@2
Expand All @@ -48,7 +48,7 @@ jobs:
- task: 1ES.PublishPipelineArtifact@1
inputs:
path: $(Build.ArtifactStagingDirectory)
artifact: docker_drops
artifact: docker_staged

- job: PublishACR
displayName: "Publish to ACR"
Expand All @@ -61,8 +61,8 @@ jobs:
templateContext:
inputs:
- input: pipelineArtifact
artifactName: docker_drops
targetPath: $(Pipeline.Workspace)/docker_drops
artifactName: docker_staged
targetPath: $(Pipeline.Workspace)/docker_staged

outputs:
- output: containerImage
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- task: 1ES.BuildContainerImage@1
displayName: Build Docker Image
inputs:
path: '$(Pipeline.Workspace)/docker_drops'
path: '$(Pipeline.Workspace)/docker_staged'
image: image:tag
buildArguments: |
--build-arg PUBLISH_DIR="Azure.Mcp.Server/linux-x64/dist"
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/initialize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
./eng/scripts/Get-ToolsToTest.ps1
-SetDevOpsVariables
-TestType 'Live'
-ServerName '${{ iif(eq(parameters.ServerName, 'none'), '', parameters.ServerName) }}'
-ServerName '${{ parameters.ServerName }}'
name: GetTestPathsLive
displayName: "Get paths to test (Live)"
workingDirectory: $(Build.SourcesDirectory)
Expand Down
14 changes: 7 additions & 7 deletions eng/pipelines/templates/jobs/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
- checkout: self

- download: current
displayName: Download npm_$(PipelineArtifactName)_packed
artifact: npm_$(PipelineArtifactName)_packed
displayName: Download packages_npm
artifact: packages_npm

- template: /eng/pipelines/templates/steps/publish-to-dev-feed.yml
parameters:
PathToArtifacts: $(Pipeline.Workspace)/npm_$(PipelineArtifactName)_packed
PathToArtifacts: $(Pipeline.Workspace)/packages_npm
Registry: https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/
${{ if and(eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['Build.Reason'], 'IndividualCI')) }}:
Tag: dev
Expand All @@ -32,21 +32,21 @@ jobs:
- checkout: self

- download: current
displayName: Download nuget_$(PipelineArtifactName)_packed
artifact: nuget_$(PipelineArtifactName)_packed
displayName: Download packages_nuget_signed
artifact: packages_nuget_signed

- task: 1ES.PublishNuget@1
displayName: Publish platform-specific Nugets
inputs:
packageParentPath: '$(Pipeline.Workspace)'
packagesToPush: '$(Pipeline.Workspace)/nuget_$(PipelineArtifactName)_packed/${{ parameters.ServerName }}/platform/*.nupkg;!$(Pipeline.Workspace)/nuget_$(PipelineArtifactName)_packed/${{ parameters.ServerName }}/platform/*.symbols.nupkg'
packagesToPush: '$(Pipeline.Workspace)/packages_nuget_signed/${{ parameters.ServerName }}/platform/*.nupkg;!$(Pipeline.Workspace)/packages_nuget_signed/${{ parameters.ServerName }}/platform/*.symbols.nupkg'
publishVstsFeed: ${{ parameters.NugetDevFeed }}

- task: 1ES.PublishNuget@1
displayName: Publish wrapper Nuget
inputs:
packageParentPath: '$(Pipeline.Workspace)'
packagesToPush: '$(Pipeline.Workspace)/nuget_$(PipelineArtifactName)_packed/${{ parameters.ServerName }}/wrapper/*.nupkg;!$(Pipeline.Workspace)/nuget_$(PipelineArtifactName)_packed/${{ parameters.ServerName }}/wrapper/*.symbols.nupkg'
packagesToPush: '$(Pipeline.Workspace)/packages_nuget_signed/${{ parameters.ServerName }}/wrapper/*.nupkg;!$(Pipeline.Workspace)/packages_nuget_signed/${{ parameters.ServerName }}/wrapper/*.symbols.nupkg'
publishVstsFeed: ${{ parameters.NugetDevFeed }}

# - job: PublishDocsToNightly
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/templates/jobs/npm/pack-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ jobs:
- checkout: self

- download: current
displayName: Download $(PipelineArtifactName)_signed
artifact: $(PipelineArtifactName)_signed
displayName: Download binaries_signed
artifact: binaries_signed

- task: Powershell@2
displayName: "Pack modules for Npm"
inputs:
pwsh: true
filePath: $(Build.SourcesDirectory)/eng/scripts/Pack-Npm.ps1
arguments: >
-ArtifactsPath '$(Pipeline.Workspace)/$(PipelineArtifactName)_signed'
-ArtifactsPath '$(Pipeline.Workspace)/binaries_signed'
-OutputPath '$(Build.ArtifactStagingDirectory)/packed'

- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)/packed/npm
ArtifactName: npm_$(PipelineArtifactName)_packed
ArtifactName: packages_npm
SbomEnabled: ${{ ne(variables['Build.Reason'], 'PullRequest') }}
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/npm/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
isProduction: true
inputs:
- input: pipelineArtifact
artifactName: npm_$(PipelineArtifactName)_packed
artifactName: packages_npm
targetPath: $(Pipeline.Workspace)/drop
environment: package-publish
timeoutInMinutes: 120
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/templates/jobs/nuget/pack-and-sign-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
- checkout: self

- download: current
displayName: Download $(PipelineArtifactName)_signed
artifact: $(PipelineArtifactName)_signed
displayName: Download binaries_signed
artifact: binaries_signed

- script: |
brew update
Expand All @@ -29,7 +29,7 @@ jobs:
pwsh: true
filePath: $(Build.SourcesDirectory)/eng/scripts/Pack-Nuget.ps1
arguments: >
-ArtifactsPath '$(Pipeline.Workspace)/$(PipelineArtifactName)_signed'
-ArtifactsPath '$(Pipeline.Workspace)/binaries_signed'
-OutputPath '$(Build.ArtifactStagingDirectory)/packed'
-VersionSuffix '$(VersionSuffix)'
-RepoUrl '$(Build.Repository.Uri)'
Expand Down Expand Up @@ -70,5 +70,5 @@ jobs:
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)/packed/nuget
ArtifactName: nuget_$(PipelineArtifactName)_packed
ArtifactName: packages_nuget_signed
SbomEnabled: ${{ ne(variables['Build.Reason'], 'PullRequest') }}
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/nuget/release-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
isProduction: true
inputs:
- input: pipelineArtifact
artifactName: 'nuget_$(PipelineArtifactName)_packed'
artifactName: 'packages_nuget_signed'
targetPath: $(Pipeline.Workspace)/drop
environment: package-publish
timeoutInMinutes: 120
Expand Down
10 changes: 3 additions & 7 deletions eng/pipelines/templates/jobs/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
parameters:
- name: VsixTargets
type: object
- name: ServerName
type: string
- name: IncludeNative
Expand All @@ -16,8 +14,8 @@ jobs:
- checkout: self

- download: current
displayName: Download npm_$(PipelineArtifactName)_packed
artifact: npm_$(PipelineArtifactName)_packed
displayName: Download packages_npm
artifact: packages_npm

- template: /eng/common/pipelines/templates/steps/retain-run.yml

Expand All @@ -28,7 +26,7 @@ jobs:
$tag = "$serverName-$version$versionSuffix"

gh release create $tag --title "$serverName $version$versionSuffix"
gh release upload $tag $(Pipeline.Workspace)/npm_$(PipelineArtifactName)_packed/*/*/*.tgz
gh release upload $tag $(Pipeline.Workspace)/packages_npm/*/*/*.tgz
displayName: Create GitHub Release and upload artifacts
env:
GH_TOKEN: $(azuresdk-github-pat)
Expand All @@ -47,10 +45,8 @@ jobs:
- template: /eng/pipelines/templates/jobs/vsix/release-vsix.yml
parameters:
ServerName: ${{ parameters.ServerName }}
VsixTargets: ${{ parameters.VsixTargets }}
DependsOn: TagRepository


- ${{ if ne(parameters.SkipDockerRelease, 'true') }}:
- template: /eng/pipelines/templates/jobs/docker/release-docker.yml
parameters:
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/templates/jobs/sign-and-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
filePath: $(Build.SourcesDirectory)/eng/scripts/Compress-ForSigning.ps1
arguments: >
-ArtifactsPath '$(Pipeline.Workspace)'
-ArtifactPrefix '$(PipelineArtifactName)_'
-ArtifactPrefix 'build_'
-OutputPath '$(Build.ArtifactStagingDirectory)/signed'

- template: pipelines/steps/binary-signing.yml@azure-sdk-build-tools
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)/signed
ArtifactName: $(PipelineArtifactName)_signed
ArtifactName: binaries_signed
SbomEnabled: ${{ ne(variables['Build.Reason'], 'PullRequest') }}

- job: Verify_Signing
Expand All @@ -84,13 +84,13 @@ jobs:
- checkout: none

- download: current
artifact: $(PipelineArtifactName)_signed
artifact: binaries_signed
displayName: "Download signed MCP server binaries"

- pwsh: |
Write-Host "Verifying binary signing for win-x64 and win-arm64 binaries..."
$allSigned = $true
$signedBinaries = Get-ChildItem -Path '$(Pipeline.Workspace)/$(PipelineArtifactName)_signed/**/win-*' -Recurse -Include @("*.dll", "*.exe")
$signedBinaries = Get-ChildItem -Path '$(Pipeline.Workspace)/binaries_signed/**/win-*' -Recurse -Include @("*.dll", "*.exe")
foreach ($binary in $signedBinaries) {
if ((Get-AuthenticodeSignature -FilePath $binary.FullName).Status -ne 'Valid') {
Write-Host "Binary $($binary.FullName) is NOT signed correctly."
Expand Down
10 changes: 5 additions & 5 deletions eng/pipelines/templates/jobs/vsix/pack-and-sign-vsix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

# Download the signed MCP server binaries for this OS
- download: current
artifact: $(PipelineArtifactName)_signed
artifact: binaries_signed
displayName: "Download signed MCP server binaries"

- task: NodeTool@0
Expand All @@ -28,7 +28,7 @@ jobs:
- pwsh: >
eng/scripts/Pack-Vsix.ps1
-ServerName '${{ parameters.ServerName }}'
-ArtifactsPath '$(Pipeline.Workspace)/$(PipelineArtifactName)_signed'
-ArtifactsPath '$(Pipeline.Workspace)/binaries_signed'
-OutputPath '$(Build.ArtifactStagingDirectory)'
displayName: "Copy signed MCP server binaries to VSIX"

Expand All @@ -40,7 +40,7 @@ jobs:
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)
ArtifactName: vsix_packages_signed
ArtifactName: packages_vsix_signed

- job: VerifyVSIXSigning
displayName: "Verify VSIX Signing"
Expand All @@ -55,12 +55,12 @@ jobs:
steps:
- checkout: none
- download: current
artifact: vsix_$(PipelineArtifactName)_signed
artifact: packages_vsix_signed
displayName: "Download signed MCP server VSIX files"
- pwsh: |
Write-Host "Verifying VSIX signing by parsing CodeSignSummary markdown files..."

$root = "$(Pipeline.Workspace)/vsix_$(PipelineArtifactName)_signed"
$root = "$(Pipeline.Workspace)/packages_vsix_signed"
$summaries = Get-ChildItem -Path $root -Recurse -Filter 'CodeSignSummary-*.md'

if (-not $summaries) {
Expand Down
14 changes: 11 additions & 3 deletions eng/pipelines/templates/jobs/vsix/release-vsix.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
parameters:
- name: ServerName
type: string
- name: VsixTargets
type: object
- name: DependsOn
type: object
- name: VsixTargets
type: object
default:
- linux-x64
- linux-arm64
- osx-x64
- osx-arm64
- win-x64
- win-arm64


jobs:
# Deployment Jobs: Publish VSIX artifacts to Marketplace for each vsix target
Expand All @@ -18,7 +26,7 @@ jobs:
isProduction: true
inputs:
- input: pipelineArtifact
artifactName: vsix_packages_signed
artifactName: packages_vsix_signed
targetPath: $(Pipeline.Workspace)/drop
environment: package-publish
pool:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/templates/variables/globals.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
variables:
OfficialBuildId: $(Build.BuildNumber)
skipComponentGovernanceDetection: true
PipelineArtifactName: packages
nugetMultiFeedWarnLevel: 'none'
GDN_SUPPRESS_FORKED_BUILD_WARNING: true