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

Onboarding MicroBuild #280

Merged
merged 3 commits into from
Feb 26, 2024
Merged
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
173 changes: 92 additions & 81 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,102 @@
pool:
name: VSEngSS-MicroBuild2022-1ES
demands: msbuild

variables:
BuildConfiguration: 'Release'
BuildPlatform: ''
Codeql.Enabled: true

steps:
- task: MicroBuildSigningPlugin@1
inputs:
signType: '$(SignType)'
zipSources: true

- task: MSBuild@1
displayName: '/t:Pack'
inputs:
solution: MSBuildLocator.sln
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArguments: '/t:Pack /restore -binaryLogger:$(Build.SourcesDirectory)\Pack.binlog'

- task: CopyFiles@2
displayName: 'Collect Symbols'
inputs:
SourceFolder: src/MSBuildLocator
Contents: '**\*.pdb'
TargetFolder: '$(Build.ArtifactStagingDirectory)/symbols'
CleanTargetFolder: true

- task: PublishSymbols@2
displayName: 'Enable Source Server'
inputs:
SymbolsFolder: '$(Build.ArtifactStagingDirectory)\symbols'
SearchPattern: '**/*.pdb'
SymbolServerType: TeamServices
- name: BuildPlatform
value: ''
- name: BuildConfiguration
value: 'Release'
- name: TeamName
value: 'MSBuildLocator'

- task: PublishBuildArtifacts@1
displayName: 'Upload Symbols Artifact'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/symbols'
ArtifactName: Symbols
resources:
repositories:
- repository: CustomPipelineTemplates
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate

- task: CopyFiles@2
displayName: 'Copy Bin to drop'
inputs:
SourceFolder: 'src\MSBuildLocator\bin\Release'
TargetFolder: '$(Build.ArtifactStagingDirectory)\bin'
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@CustomPipelineTemplates
parameters:
pool:
name: VSEngSS-MicroBuild2022-1ES
demands:
- msbuild
sdl:
sourceAnalysisPool:
name: VSEngSS-MicroBuild2022-1ES
stages:
- stage: stage
jobs:
- job: job
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'Upload Symbols Artifact'
targetPath: '$(Build.ArtifactStagingDirectory)/symbols'
artifactName: Symbols
- output: pipelineArtifact
displayName: 'Upload Bin to drop'
targetPath: '$(Build.ArtifactStagingDirectory)\bin'
artifactName: bin
- output: pipelineArtifact
displayName: 'Upload NuGet to drop'
targetPath: '$(Build.ArtifactStagingDirectory)\pkg'
artifactName: pkg
- output: pipelineArtifact
displayName: 'Upload MicroBuildOutputs to drop'
targetPath: '$(Build.StagingDirectory)\MicroBuild\Output'
artifactName: MicroBuildOutputs
continueOnError: true
- output: pipelineArtifact
displayName: 'Upload logs to drop'
targetPath: '$(Build.ArtifactStagingDirectory)\logs'
artifactName: logs
condition: succeededOrFailed()
steps:
- task: MicroBuildSigningPlugin@1
inputs:
signType: '$(SignType)'
zipSources: true

- task: PublishBuildArtifacts@1
displayName: 'Upload Bin to drop'
inputs:
PathToPublish: '$(Build.ArtifactStagingDirectory)\bin'
ArtifactName: bin
- task: MSBuild@1
displayName: '/t:Pack'
inputs:
solution: MSBuildLocator.sln
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArguments: '/t:Pack /restore -binaryLogger:$(Build.SourcesDirectory)\Pack.binlog'

- task: CopyFiles@2
displayName: 'Copy NuGet to drop'
inputs:
SourceFolder: 'src\MSBuildLocator\bin\Release'
Contents: '*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)\pkg'
- task: CopyFiles@2
displayName: 'Collect Symbols'
inputs:
SourceFolder: src/MSBuildLocator
Contents: '**\*.pdb'
TargetFolder: '$(Build.ArtifactStagingDirectory)\symbols'
CleanTargetFolder: true

- task: PublishBuildArtifacts@1
displayName: 'Upload NuGet to drop'
inputs:
PathToPublish: '$(Build.ArtifactStagingDirectory)\pkg'
ArtifactName: pkg
- task: PublishSymbols@2
displayName: 'Enable Source Server'
inputs:
SymbolsFolder: '$(Build.ArtifactStagingDirectory)\symbols'
SearchPattern: '**/*.pdb'
SymbolServerType: TeamServices

- task: PublishPipelineArtifact@1
displayName: 'Upload MicroBuildOutputs to drop'
inputs:
TargetPath: '$(Build.StagingDirectory)\MicroBuild\Output'
ArtifactName: MicroBuildOutputs
continueOnError: true
- task: CopyFiles@2
displayName: 'Copy Bin to drop'
inputs:
SourceFolder: 'src\MSBuildLocator\bin\Release'
TargetFolder: '$(Build.ArtifactStagingDirectory)\bin'

- task: CopyFiles@2
displayName: 'Copy logs to drop'
inputs:
Contents: '**\*.*log'
TargetFolder: '$(Build.ArtifactStagingDirectory)\logs'
- task: CopyFiles@2
displayName: 'Copy NuGet to drop'
inputs:
SourceFolder: 'src\MSBuildLocator\bin\Release'
Contents: '*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)\pkg'

- task: PublishBuildArtifacts@1
displayName: 'Upload logs to drop'
inputs:
PathToPublish: '$(Build.ArtifactStagingDirectory)\logs'
ArtifactName: logs
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy logs to drop'
inputs:
Contents: '**\*.*log'
TargetFolder: '$(Build.ArtifactStagingDirectory)\logs'

- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
displayName: 'Execute cleanup tasks'
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
displayName: 'Execute cleanup tasks'
Loading