This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.yml
105 lines (89 loc) · 3.15 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
trigger:
- v2.2.1-vsmac
pr:
- v2.2.1-vsmac
resources:
repositories:
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
sdl:
sourceAnalysisPool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
sbom:
enabled: false
stages:
- stage: Build
jobs:
- job: Build
pool:
name: 'Azure Pipelines'
vmImage: 'macos-latest'
os: macOS
variables:
- name: Codeql.Enabled
value: true
- name: Codeql.TSAEnabled
value: true
- name: Packaging.EnableSBOMSigning
value: true
- name: BUILDSECMON_OPT_IN
value: true
steps:
# Manually added because it will not auto-inject for some reason
- task: CodeQL3000Init@0
condition: eq(variables['Build.SourceBranchName'], 'v2.2.1-vsmac')
- task: DotNetCoreCLI@2
displayName: Build and Package
inputs:
command: build
arguments: '-c Release'
# Manually added because it will not auto-inject for some reason
- task: CodeQL3000Finalize@0
condition: eq(variables['Build.SourceBranchName'], 'v2.2.1-vsmac')
- task: 1ES.PublishNuget@1
displayName: Push
condition: false
#condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'v2.2.1-vsmac'))
inputs:
packagesToPush: 'packages/Release/**.nupkg'
packageParentPath: 'packages/Release'
feedPublish: 'Xamarin'
- task: Bash@3
displayName: 'Copy files for SBOM'
inputs:
targetType: 'inline'
script: |
mkdir -p sbom/Mono.TextTemplating
mkdir -p sbom/Mono.TextTemplating.Roslyn
mkdir -p sbom/dotnet-t4
mkdir -p sbom/TextTransform
cp -R Mono.TextTemplating/bin/Release sbom/Mono.TextTemplating
cp -R Mono.TextTemplating.Roslyn/bin/Release sbom/Mono.TextTemplating.Roslyn
cp -R dotnet-t4/bin/Release sbom/dotnet-t4
cp -R TextTransform/bin/Release sbom/TextTransform
workingDirectory: '$(Build.SourcesDirectory)'
- task: ManifestGeneratorTask@0
inputs:
PackageName: 'xamarin-t4'
BuildDropPath: '$(Build.SourcesDirectory)/sbom'
ManifestDirPath: '$(Build.SourcesDirectory)'
BuildComponentPath: '$(Build.SourcesDirectory)'
AdditionalComponentDetectorArgs: '--DirectoryExclusionList **/Tests/**;**/packages/**'
displayName: 'Generating SBOM'
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: 'packages/Release'
artifactName: NuGet
displayName: Publish NuGet packages
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.SourcesDirectory)/_manifest'
artifactName: SBOM
displayName: Publish SBOM