зеркало из
1
0
Форкнуть 0
SkiaSharp.Extended/azure-pipelines.yml

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

2024-03-01 00:57:47 +03:00
# Overridden in the UI
trigger: none
pr: none
2020-08-15 03:08:53 +03:00
2024-03-01 00:57:47 +03:00
parameters:
- name: runCompliance
displayName: 'Run post-build compliance tasks (such as API Scan)'
type: boolean
default: false
2024-04-06 00:25:31 +03:00
- name: buildAgent
displayName: 'The build agent to use'
type: object
default:
name: Maui-1ESPT
image: 1ESPT-Windows2022
os: windows
2020-08-15 03:30:14 +03:00
variables:
2024-03-01 00:57:47 +03:00
- template: /scripts/azure-pipelines-variables.yml@self
2020-08-15 03:08:53 +03:00
2019-02-19 21:08:58 +03:00
resources:
repositories:
2020-08-14 10:11:29 +03:00
- repository: internal-templates
2019-02-19 21:08:58 +03:00
type: github
name: xamarin/yaml-templates
endpoint: xamarin
ref: refs/heads/main
2024-03-01 00:57:47 +03:00
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
2019-02-19 21:08:58 +03:00
2024-03-01 00:57:47 +03:00
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
2024-04-06 00:25:31 +03:00
pool: ${{ parameters.buildAgent }}
2024-03-01 00:57:47 +03:00
customBuildTags:
- ES365AIMigrationTooling
stages:
2024-03-01 00:57:47 +03:00
- stage: build
displayName: Build
2024-03-01 00:57:47 +03:00
jobs:
- job: build
displayName: Build
templateContext:
sdl:
2024-04-06 00:25:31 +03:00
apiscan:
enabled: true
binskim:
enabled: true
break: false
codeInspector:
enabled: true
credscan:
enabled: true
policheck:
enabled: true
2024-03-01 00:57:47 +03:00
spotBugs:
enabled: false
outputParentDirectory: 'output'
outputs:
- output: pipelineArtifact
displayName: 'Upload NuGets'
artifactName: 'nuget'
targetPath: 'output/nugets'
steps:
- template: /scripts/azure-pipelines-steps-prepare.yml@self
- pwsh: dotnet cake --target=pack
displayName: Pack NuGets
env:
JavaSdkDirectory: $(JAVA_HOME)
2024-03-01 00:57:47 +03:00
- stage: signing
displayName: Sign NuGets
dependsOn: build
jobs:
- template: sign-artifacts/jobs/v2.yml@internal-templates
parameters:
usePipelineArtifactTasks: true
use1ESTemplate: true
${{ if or( eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') ) }}:
signType: 'Real'
${{ else }}:
signType: 'Test'
- ${{ if or( eq(variables['Build.Reason'], 'Schedule'), parameters.runCompliance ) }}:
- template: security/apiscan/v0.yml@internal-templates
parameters:
2024-04-06 00:25:31 +03:00
windowsPoolName: ${{ parameters.buildAgent.name }}
windowsImageOverride: ${{ parameters.buildAgent.image }}
2024-03-01 03:38:16 +03:00
timeoutInMinutes: 480
2024-03-01 00:57:47 +03:00
stageDependsOn:
- build
scanArtifacts:
- nuget
apiScanSoftwareName: SkiaSharp
apiScanSoftwareVersionNum: $(MAJOR_VERSION)
2024-04-06 00:25:31 +03:00
apiScanAuthConnectionString: 'runAs=App;AppId=$(ApiScanClientId)'
preScanSteps:
- pwsh: |
$nupkgs = (Get-ChildItem "$(Build.ArtifactStagingDirectory)\binaries-to-scan\*\*.*nupkg")
foreach ($nupkg in $nupkgs) {
$filename = $nupkg.Name.TrimEnd('.nupkg')
$dest = "$(Build.ArtifactStagingDirectory)\binaries-to-scan\nuget_symbols-extracted\$filename"
Write-Host "Extracting '$nupkg' to '$dest'..."
Expand-Archive $nupkg $dest
Remove-Item $nupkg
}
displayName: Extract all the .nupkg files