Use 1ES.Official.PipelineTemplate
This commit is contained in:
Родитель
7be0ee15e2
Коммит
2533f9d115
105
build.yml
105
build.yml
|
@ -4,50 +4,75 @@ trigger:
|
|||
pr:
|
||||
- mac
|
||||
|
||||
pool:
|
||||
vmImage: 'macos-latest'
|
||||
resources:
|
||||
repositories:
|
||||
- repository: 1esPipelines
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||||
ref: refs/tags/release
|
||||
|
||||
variables:
|
||||
- name: Codeql.Enabled
|
||||
value: false
|
||||
- name: Packaging.EnableSBOMSigning
|
||||
value: true
|
||||
- name: BUILDSECMON_OPT_IN
|
||||
value: true
|
||||
extends:
|
||||
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
|
||||
parameters:
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
sbom:
|
||||
enabled: false
|
||||
|
||||
steps:
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
- job: Build
|
||||
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: Authenticate NuGet feeds
|
||||
inputs:
|
||||
forceReinstallCredentialProvider: true
|
||||
pool:
|
||||
name: 'Azure Pipelines'
|
||||
vmImage: 'macos-latest'
|
||||
os: macOS
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Build and Package
|
||||
inputs:
|
||||
command: build
|
||||
projects: Editor/MonoDevelop.Xml.Editor.csproj
|
||||
arguments: '-c Release'
|
||||
variables:
|
||||
- name: Codeql.Enabled
|
||||
value: false
|
||||
- name: Packaging.EnableSBOMSigning
|
||||
value: true
|
||||
- name: BUILDSECMON_OPT_IN
|
||||
value: true
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Push
|
||||
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'mac'))
|
||||
inputs:
|
||||
command: push
|
||||
searchPatternPush: '**/Release/*.nupkg'
|
||||
feedPublish: 'Xamarin'
|
||||
steps:
|
||||
|
||||
- task: ManifestGeneratorTask@0
|
||||
inputs:
|
||||
PackageName: 'MonoDevelop.Xml (Xamarin)'
|
||||
BuildDropPath: '$(Build.SourcesDirectory)/Editor/bin'
|
||||
ManifestDirPath: '$(Build.SourcesDirectory)'
|
||||
BuildComponentPath: '$(Build.SourcesDirectory)'
|
||||
AdditionalComponentDetectorArgs: '--DirectoryExclusionList **/Tests/**'
|
||||
displayName: 'Generating SBOM'
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: Authenticate NuGet feeds
|
||||
inputs:
|
||||
forceReinstallCredentialProvider: true
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathToPublish: '$(Build.SourcesDirectory)/_manifest'
|
||||
artifactName: SBOM
|
||||
displayName: Publish SBOM
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Build and Package
|
||||
inputs:
|
||||
command: build
|
||||
projects: Editor/MonoDevelop.Xml.Editor.csproj
|
||||
arguments: '-c Release'
|
||||
|
||||
- task: 1ES.PublishNuget@1
|
||||
displayName: Push
|
||||
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'mac'))
|
||||
inputs:
|
||||
packagesToPush: '**/Release/*.nupkg'
|
||||
packageParentPath: '$(Build.SourcesDirectory)'
|
||||
feedPublish: 'Xamarin'
|
||||
|
||||
- task: ManifestGeneratorTask@0
|
||||
inputs:
|
||||
PackageName: 'MonoDevelop.Xml (Xamarin)'
|
||||
BuildDropPath: '$(Build.SourcesDirectory)/Editor/bin'
|
||||
ManifestDirPath: '$(Build.SourcesDirectory)'
|
||||
BuildComponentPath: '$(Build.SourcesDirectory)'
|
||||
AdditionalComponentDetectorArgs: '--DirectoryExclusionList **/Tests/**'
|
||||
displayName: 'Generating SBOM'
|
||||
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: '$(Build.SourcesDirectory)/_manifest'
|
||||
artifactName: SBOM
|
||||
displayName: Publish SBOM
|
||||
|
|
Загрузка…
Ссылка в новой задаче