theme-converter-for-vs/azure-pipelines.yml

104 строки
3.5 KiB
YAML
Исходник Постоянная ссылка Обычный вид История

name: $(date:yy)$(DayOfYear)$(rev:.r)
trigger:
branches:
include:
- main
pr:
branches:
include:
- main
drafts: false
variables:
TeamName: VS Core - IDE Experience
SolutionFile: ThemeConverter/ThemeConverter.sln
Platform: Any CPU
BuildConfiguration: Release
ProductBinariesFolder: '$(System.DefaultWorkingDirectory)/ThemeConverter/ThemeConverter/bin/$(BuildConfiguration)/net6.0'
VersionMajor: 0
VersionMinor: 1
AssemblyVersion: $(VersionMajor).$(VersionMinor).0.0
ProductVersion: $(VersionMajor).$(VersionMinor).$(Build.BuildNumber)
SignType: Test
CodeQL.Enabled: true
Codeql.TSAEnabled: false
Codeql.TSAOptionsPath: $(Build.SourcesDirectory)/.config/tsaoptions.json
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
sdl:
policheck:
enabled: true
tsa:
enabled: false
pool:
name: VSEngSS-MicroBuild2022-1ES
demands:
- msbuild
- VisualStudio_17.0
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: Build
jobs:
- job: Build_And_Compliance
displayName: Build and Compliance
templateContext:
mb:
signing:
enabled: true
signType: $(SignType)
feedSource: 'https://pkgs.dev.azure.com/devdiv/_packaging/MicroBuildToolset/nuget/v3/index.json'
sbom:
enabled: true
feedSource: 'https://pkgs.dev.azure.com/devdiv/_packaging/MicroBuildToolset/nuget/v3/index.json'
outputs:
- output: pipelineArtifact
displayName: 'Publish Staging Directory'
targetPath: $(Build.StagingDirectory)
steps:
- checkout: self
clean: true
- task: NuGetCommand@2
displayName: Restore NuGet Packages
inputs:
command: 'restore'
restoreSolution: $(SolutionFile)
- task: MSBuild@1
displayName: Build Product
inputs:
solution: $(SolutionFile)
platform: $(Platform)
configuration: $(BuildConfiguration)
msbuildArguments: /Property:Version=$(ProductVersion) /Property:FileVersion=$(ProductVersion) /Property:AssemblyVersion=$(AssemblyVersion) /Property:SignType=$(SignType)
continueOnError: false
- task: DotNetCoreCLI@2
displayName: Run Tests
inputs:
command: 'test'
projects: '**/ThemeConverterTests.csproj'
arguments: '--configuration Release'
- task: ArchiveFiles@2
displayName: Archive Binaries
inputs:
rootFolderOrFile: '$(ProductBinariesFolder)'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(Build.StagingDirectory)/ThemeConverter-$(VersionMajor).$(VersionMinor).$(Build.BuildNumber).zip'
replaceExistingArchive: true
- task: ManifestGeneratorTask@0
displayName: 'Generation Task'
inputs:
BuildDropPath: '$(Build.StagingDirectory)'
- task: TSAUpload@2
displayName: 'TSA upload to Codebase (Theme Converter for VS)'
inputs:
GdnPublishTsaOnboard: True
GdnPublishTsaConfigFile: '$(Build.SourcesDirectory)/.config/tsaoptions.json'
condition: false