Skip to content
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

Migrate Release Pipelines to 1ES #1438

Merged
merged 2 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
41 changes: 35 additions & 6 deletions eng/pipelines/VS-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,40 @@
name: $(Date:yyyMMdd).$(Rev:r)
variables:
- group: TSDTUSR
jobs:
- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml
parameters:
DisplayName: 'VS_Release'
JobTemplate:
- template: ../templates/VS-release.template.yml

resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release

extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: VSEngSS-MicroBuild2022-1ES
os: windows
sdl:
sourceAnalysisPool:
name: VSEngSS-MicroBuild2022-1ES
os: windows
stages:
- stage: stage
displayName: VS_Release
jobs:
- job: Phase_1
displayName: VS_Release
timeoutInMinutes: 180
cancelTimeoutInMinutes: 1
templateContext:
mb:
signing:
enabled: true
signType: real
zipSources: false
localization:
enabled: true
steps:
- template: /eng/pipelines/templates/VS-release.template.yml@self
...
76 changes: 51 additions & 25 deletions eng/pipelines/VSCode-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,57 @@
name: $(Date:yyyMMdd).$(Rev:r)
variables:
- group: TSDTUSR
stages:
- stage: Windows
dependsOn: []
jobs:
- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml
parameters:
DisplayName: 'VSCode_Release'
JobTemplate:
- template: ../templates/VSCode-release.template.yml

- stage: OSX_CodeSign
dependsOn: [Windows]
jobs:
- template: ./jobs/MSHosted-OSX.job.yml
parameters:
DisplayName: 'OSX Sign/Harden'
JobTemplate:
- template: ../templates/VSCode-codesign-osx.template.yml
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release

- stage: OSX_ESRPSign
dependsOn: [OSX_CodeSign]
jobs:
- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml
parameters:
DisplayName: 'OSX Sign/Harden'
JobTemplate:
- template: ../templates/VSCode-esrp-sign-osx.template.yml
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: VSEngSS-MicroBuild2022-1ES
os: windows
sdl:
sourceAnalysisPool:
name: VSEngSS-MicroBuild2022-1ES
os: windows
stages:
- stage: Windows
jobs:
- job:
displayName: Windows
timeoutInMinutes: 180
cancelTimeoutInMinutes: 1
templateContext:
mb:
signing:
enabled: true
signType: real
zipSources: false
localization:
enabled: true
steps:
- template: /eng/pipelines/templates/VSCode-release.template.yml@self

- stage: OSX_CodeSign
dependsOn: [Windows]
jobs:
- template: /eng/pipelines/jobs/MSHosted-OSX.job.yml@self
parameters:
DisplayName: 'OSX Sign/Harden'
JobTemplate:
- template: ../templates/VSCode-codesign-osx.template.yml

- stage: OSX_ESRPSign
dependsOn: [OSX_CodeSign]
jobs:
- template: /eng/pipelines/jobs/VSEngSS-MicroBuild2022-1ES.job.yml@self
parameters:
DisplayName: 'OSX Sign/Harden'
JobTemplate:
- template: ../templates/VSCode-esrp-sign-osx.template.yml
...
2 changes: 2 additions & 0 deletions eng/pipelines/jobs/MSHosted-OSX.job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ jobs:
- job:
displayName: ${{ parameters.DisplayName }}
pool:
name: Azure Pipelines
vmImage: 'macOS-latest'
os: macOS
steps:
- ${{ parameters.JobTemplate }}
...
10 changes: 6 additions & 4 deletions eng/pipelines/steps/BuildSolution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ steps:
"SIGN_TYPE": "$(SignType)"
}

- template: ../tasks/PublishPipelineArtifact.yml
- template: ../tasks/1ES/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish binlogs'
targetPath: '$(Build.BinariesDirectory)/build_logs/'
artifactName: '${{ parameters.Configuration }}_binlog'
path: '$(Build.BinariesDirectory)/build_logs/'
condition: ne(variables['System.Debug'], '')

- template: ../tasks/PublishPipelineArtifact.yml
- template: ../tasks/1ES/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish debug binaries'
targetPath: '$(Build.SourcesDirectory)\bin\${{ parameters.Configuration }}'
artifactName: '${{ parameters.Configuration }}_debug_bin'
path: '$(Build.SourcesDirectory)\bin\${{ parameters.Configuration }}'
condition: ne(variables['System.Debug'], '')
...
6 changes: 3 additions & 3 deletions eng/pipelines/steps/CollectAndPublishBinaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ steps:
CleanTargetFolder: true
OverWrite: true

- template: ../tasks/PublishPipelineArtifact.yml
- template: ../tasks/1ES/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish Binaries'
path: ${{ parameters.TargetFolder }}
artifactName: '${{ parameters.ArtifactName }}'
targetPath: ${{ parameters.TargetFolder }}
artifactName: '${{ parameters.ArtifactName }}'
WardenGnaw marked this conversation as resolved.
Show resolved Hide resolved
...
4 changes: 2 additions & 2 deletions eng/pipelines/steps/CopyAndPublishSymbols.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ steps:
SearchPattern: '**\*.pdb'
SymbolServerType: TeamServices

- template: ../tasks/PublishPipelineArtifact.yml
- template: ../tasks/1ES/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish Symbols'
path: '$(Build.ArtifactStagingDirectory)/symbols'
targetPath: '$(Build.ArtifactStagingDirectory)/symbols'
artifactName: 'Symbols'
...
20 changes: 11 additions & 9 deletions eng/pipelines/steps/PackAndPublishVSPackages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ steps:
echo ##vso[task.setvariable variable=NugetPackageVersion;]%NugetPackageVersion%
displayName: 'Get NuGet Version'

- template: ../tasks/PublishPipelineArtifact.yml
- template: ../tasks/1ES/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish File Version'
path: '$(Build.SourcesDirectory)\obj\Lab.Release\NugetPackageVersion.txt'
targetPath: '$(Build.SourcesDirectory)\obj\Lab.Release\NugetPackageVersion.txt'
artifactName: 'PackageVersion'

- template: ../tasks/NuGetCommand.yml
Expand All @@ -27,11 +27,13 @@ steps:
buildProperties: 'version=$(NugetPackageVersion)'
basePath: ${{ parameters.BasePath }}

- template: ../tasks/NuGetCommand.yml
parameters:
displayName: 'NuGet push'
command: push
searchPatternPush: '$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.MIEngine.*.nupkg;$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.UnixPortSupplier.*.nupkg'
feedPublish: '97a41293-2972-4f48-8c0e-05493ae82010' # VS
condition: and(succeeded(), eq(variables['SignType'], 'real'))
- task: 1ES.PublishNuget@1
displayName: Publish Nuget package
condition: and(succeeded(), eq(variables['SignType'], 'real'))
inputs:
useDotNetTask: false # The default is false to use the NuGetCommand task. Set to true to use the DotNetCoreCLI task to publish packages.
WardenGnaw marked this conversation as resolved.
Show resolved Hide resolved
packagesToPush: '$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.MIEngine.*.nupkg;$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.UnixPortSupplier.*.nupkg'
packageParentPath: '$(Build.SourcesDirectory)'
publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010' # VS
nuGetFeedType: internal # Change to external when publishing to external feed
...
10 changes: 5 additions & 5 deletions eng/pipelines/steps/PublishOpenDebugAD7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ steps:
copy ${{ parameters.SignedBinariesFolder }}\Release\osxlaunchhelper.scpt $(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters\bin\.
displayName: "Copy osxlaunchhelper.scpt"

- template: ../tasks/PublishPipelineArtifact.yml
- template: ../tasks/1ES/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish Unsigned ${{ parameters.RuntimeID }}'
path: '$(Build.StagingDirectory)\${{ parameters.RuntimeID }}'
artifactName: 'unsigned_${{ parameters.RuntimeID }}_binaries'
targetPath: '$(Build.StagingDirectory)\${{ parameters.RuntimeID }}'
artifactName: 'unsigned_${{ parameters.RuntimeID }}_binaries'

# Publishing for non-macOS
- ${{ if not(startsWith(parameters.RuntimeID, 'osx-')) }}:
- powershell: |
Compress-Archive -Path $(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters -DestinationPath $(Build.StagingDirectory)\zips\${{ parameters.RuntimeID }}.zip
displayName: "Create ${{ parameters.RuntimeID}}.zip"

- template: ../tasks/PublishPipelineArtifact.yml
- template: ../tasks/1ES/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish ${{ parameters.RuntimeID }}'
path: '$(Build.StagingDirectory)\zips\${{ parameters.RuntimeID }}.zip'
targetPath: '$(Build.StagingDirectory)\zips\${{ parameters.RuntimeID }}.zip'
artifactName: '${{ parameters.RuntimeID }}_zip'
15 changes: 15 additions & 0 deletions eng/pipelines/tasks/1ES/PublishPipelineArtifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
parameters:
displayName: 'Publish Pipeline Artifact'
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'
condition: 'succeeded()'

steps:
- task: 1ES.PublishPipelineArtifact@1
displayName: ${{ parameters.displayName }}
inputs:
targetPath: ${{ parameters.targetPath }}
artifactName: '${{ parameters.artifactName }}'
condition: ${{ parameters.condition }}
...
2 changes: 1 addition & 1 deletion eng/pipelines/tasks/MicroBuildLocalizationPlugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
steps:
- task: ms-vseng.MicroBuildTasks.a0262b21-fb8f-46f8-bb9a-60ed560d4a87.MicroBuildLocalizationPlugin@3
- task: ms-vseng.MicroBuildTasks.a0262b21-fb8f-46f8-bb9a-60ed560d4a87.MicroBuildLocalizationPlugin@4
displayName: 'Install Localization Plugin'
...
4 changes: 0 additions & 4 deletions eng/pipelines/templates/VS-release.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ steps:

- template: ../tasks/NuGetToolInstaller.yml

- template: ../tasks/MicroBuildSigningPlugin.yml

- template: ../tasks/MicroBuildLocalizationPlugin.yml

- template: ../steps/BuildSolution.yml
parameters:
Configuration: 'Lab.Release'
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/VSCode-codesign-osx.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ steps:
echo "#[command] zip -r $(Pipeline.Workspace)/${{ rid }}.zip ./debugAdapters"
zip -r $(Pipeline.Workspace)/${{ rid }}.zip ./debugAdapters

- template: ../tasks/PublishPipelineArtifact.yml
- template: ../tasks/1ES/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish Binaries'
path: '$(Pipeline.Workspace)/${{ rid }}.zip'
targetPath: '$(Pipeline.Workspace)/${{ rid }}.zip'
artifactName: 'unsigned_${{ rid }}_zip'
...
4 changes: 2 additions & 2 deletions eng/pipelines/templates/VSCode-esrp-sign-osx.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ steps:
SigningTarget: '$(Pipeline.Workspace)\Artifacts\${{ rid }}.zip'
SigningCert: 8023

- template: ../tasks/PublishPipelineArtifact.yml
- template: ../tasks/1ES/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish Binaries'
path: '$(Pipeline.Workspace)\Artifacts\${{ rid }}.zip'
targetPath: '$(Pipeline.Workspace)\Artifacts\${{ rid }}.zip'
artifactName: '${{ rid }}_zip'
...
2 changes: 0 additions & 2 deletions eng/pipelines/templates/VSCode-release.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ steps:

- template: ../tasks/NuGetToolInstaller.yml

- template: ../tasks/MicroBuildSigningPlugin.yml

- template: ../tasks/UseDotNet.yml

- template: ../steps/BuildSolution.yml
Expand Down
Loading