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

Fix CodeAnalysis Pipeline from 1ES Pipeline Upgrade #1440

Merged
merged 1 commit into from
Feb 28, 2024
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
3 changes: 3 additions & 0 deletions eng/pipelines/steps/BuildSolution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
Solution: '$(Build.SourcesDirectory)\src\MIDebugEngine.sln'
Configuration: 'Release'
BuildArguments: ''
OneESPT: false

steps:
- template: ../tasks/NuGetCommand.yml
Expand Down Expand Up @@ -37,11 +38,13 @@ steps:
targetPath: '$(Build.BinariesDirectory)/build_logs/'
artifactName: '${{ parameters.Configuration }}_binlog'
condition: ne(variables['System.Debug'], '')
OneESPT: ${{ parameters.OneESPT }}

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

steps:
- template: ../tasks/CopyFiles.yml
Expand All @@ -18,4 +19,5 @@ steps:
displayName: 'Publish Binaries'
targetPath: ${{ parameters.TargetFolder }}
artifactName: '${{ parameters.ArtifactName }}'
OneESPT: ${{ parameters.OneESPT }}
...
4 changes: 4 additions & 0 deletions eng/pipelines/steps/CopyAndPublishSymbols.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Collects build symbols and publishes them as 'Symbols'
---
parameters:
OneESPT: false

steps:
- template: ../tasks/CopyFiles.yml
parameters:
Expand Down Expand Up @@ -32,4 +35,5 @@ steps:
displayName: 'Publish Symbols'
targetPath: '$(Build.ArtifactStagingDirectory)/symbols'
artifactName: 'Symbols'
OneESPT: ${{ parameters.OneESPT }}
...
1 change: 1 addition & 0 deletions eng/pipelines/steps/PackAndPublishVSPackages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ steps:
displayName: 'Publish File Version'
targetPath: '$(Build.SourcesDirectory)\obj\Lab.Release\NugetPackageVersion.txt'
artifactName: 'PackageVersion'
OneESPT: true

- template: ../tasks/NuGetCommand.yml
parameters:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/steps/PublishOpenDebugAD7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ steps:
displayName: 'Publish Unsigned ${{ parameters.RuntimeID }}'
targetPath: '$(Build.StagingDirectory)\${{ parameters.RuntimeID }}'
artifactName: 'unsigned_${{ parameters.RuntimeID }}_binaries'
OneESPT: true

# Publishing for non-macOS
- ${{ if not(startsWith(parameters.RuntimeID, 'osx-')) }}:
Expand All @@ -56,3 +57,4 @@ steps:
displayName: 'Publish ${{ parameters.RuntimeID }}'
targetPath: '$(Build.StagingDirectory)\zips\${{ parameters.RuntimeID }}.zip'
artifactName: '${{ parameters.RuntimeID }}_zip'
OneESPT: true
21 changes: 15 additions & 6 deletions eng/pipelines/tasks/1ES/PublishPipelineArtifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ parameters:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'
condition: 'succeeded()'
OneESPT: false # Indicates that this is running under the 1ES Pipeline Template

steps:
- task: 1ES.PublishPipelineArtifact@1
displayName: ${{ parameters.displayName }}
inputs:
targetPath: ${{ parameters.targetPath }}
artifactName: '${{ parameters.artifactName }}'
condition: ${{ parameters.condition }}
- ${{ if eq(parameters['OneESPT'], true) }}:
- task: 1ES.PublishPipelineArtifact@1
displayName: ${{ parameters.displayName }}
inputs:
targetPath: ${{ parameters.targetPath }}
artifactName: '${{ parameters.artifactName }}'
condition: ${{ parameters.condition }}
- ${{ else }}:
- template: ../PublishPipelineArtifact.yml
parameters:
path: '${{ parameters.targetPath }}'
artifactName: '${{ parameters.artifactName }}'
displayName: ${{ parameters.displayName }}
condition: ${{ parameters.condition }}
...
2 changes: 2 additions & 0 deletions eng/pipelines/templates/Build.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
- template: ../steps/BuildSolution.yml
parameters:
Configuration: ${{ parameters.Configuration }}
OneESPT: false

- template: ../tasks/CSharp.yml

Expand All @@ -26,6 +27,7 @@ steps:
parameters:
TargetFolder: '$(Build.StagingDirectory)\drop'
ArtifactName: '${{ parameters.Configuration }}'
OneESPT: false

- template: ../tasks/MicroBuildCleanup.yml
...
4 changes: 4 additions & 0 deletions eng/pipelines/templates/VS-release.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ steps:
- template: ../steps/BuildSolution.yml
parameters:
Configuration: 'Lab.Release'
OneESPT: true

- template: ../steps/CollectAndPublishBinaries.yml
parameters:
TargetFolder: '$(Build.StagingDirectory)\drop'
ArtifactName: 'drop'
OneESPT: true

- template: ../tasks/SignVerify.yml
parameters:
TargetFolders: '$(Build.StagingDirectory)\drop'

- template: ../steps/CopyAndPublishSymbols.yml
parameters:
OneESPT: true

- template: ../steps/PackAndPublishVSPackages.yml
parameters:
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/templates/VSCode-codesign-osx.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ steps:
displayName: 'Publish Binaries'
targetPath: '$(Pipeline.Workspace)/${{ rid }}.zip'
artifactName: 'unsigned_${{ rid }}_zip'
OneESPT: true
...
1 change: 1 addition & 0 deletions eng/pipelines/templates/VSCode-esrp-sign-osx.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ steps:
displayName: 'Publish Binaries'
targetPath: '$(Pipeline.Workspace)\Artifacts\${{ rid }}.zip'
artifactName: '${{ rid }}_zip'
OneESPT: true
...
4 changes: 4 additions & 0 deletions eng/pipelines/templates/VSCode-release.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@ steps:
- template: ../steps/BuildSolution.yml
parameters:
Configuration: 'Lab.Release'
OneESPT: true

- template: ../steps/CollectAndPublishBinaries.yml
parameters:
TargetFolder: '$(Build.StagingDirectory)\bin'
ArtifactName: 'bin'
OneESPT: true

- template: ../tasks/SignVerify.yml
parameters:
TargetFolders: '$(Build.StagingDirectory)\bin'
ExcludeFolders: '.git MicroBuild'

- template: ../steps/CopyAndPublishSymbols.yml
parameters:
OneESPT: true

- script: |
mkdir $(Build.StagingDirectory)\zips\
Expand Down
Loading