fhir-server/build/InternalChecksCI-azureBuild...

166 строки
3.5 KiB
YAML

name: fhir-ci-$(Date:yyyyMMdd)$(Rev:-r)
parameters:
- name: BuildConfiguration
default: release
variables:
- name: vmImage
value: windows-latest
trigger:
branches:
include:
- main
paths:
include:
- /
exclude:
- /build
- /docs
batch: True
resources:
repositories:
- repository: self
type: git
ref: main
jobs:
- job: Phase_1
displayName: Internal Checks CI - build and restore
cancelTimeoutInMinutes: 1
pool:
vmImage: $(vmImage)
steps:
- checkout: self
persistCredentials: True
- task: NuGetToolInstaller@0
displayName: Use NuGet 4.3.0
inputs:
versionSpec: 4.3.0
- task: NuGetCommand@2
displayName: NuGet restore
enabled: False
inputs:
selectOrConfig: config
nugetConfigPath: nuget.config
- task: UseDotNet@2
displayName: Use .NET Core sdk
inputs:
useGlobalJson: true
- task: DotNetCoreCLI@1
name: ''
displayName: dotnet build
inputs:
projects: '**/*.sln'
arguments: --configuration ${{ parameters.BuildConfiguration }} --version-suffix $(build.buildnumber) /warnaserror
- task: ComponentGovernanceComponentDetection@0
displayName: Component Detection
- task: AutoApplicability@1
displayName: Run AutoApplicability
continueOnError: True
inputs:
ExternalRelease: true
IsService: true
- task: BinSkim@3
displayName: 'Run BinSkim '
continueOnError: True
inputs:
InputType: Basic
AnalyzeTarget: $(Build.SourcesDirectory)\Microsoft.Health.*.dll
- task: CodeMetrics@1
displayName: 'Run CodeMetrics '
continueOnError: True
enabled: False
inputs:
Files: $(Build.SourcesDirectory)\**\*.dll
- task: CredScan@2
displayName: Run CredScan
continueOnError: True
inputs:
outputFormat: sarif
debugMode: false
folderSuppression: false
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- task: PoliCheck@1
displayName: Run PoliCheck
continueOnError: True
- task: VulnerabilityAssessment@0
displayName: Run Vulnerability Assessment
continueOnError: True
- task: SdtReport@1
displayName: Create Security Analysis Report
condition: succeededOrFailed()
continueOnError: True
inputs:
BinSkim: true
CredScan: true
- task: PublishSecurityAnalysisLogs@2
displayName: Publish Security Analysis Logs
condition: succeededOrFailed()
continueOnError: True
- task: PostAnalysis@1
displayName: Post Analysis
condition: succeededOrFailed()
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
BinSkim: true
CredScan: true
- task: uploadScanResults@1
displayName: Upload Scan Results for Analysis
inputs:
areaPathParent: Health
areaPathChild: Olympus
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- job: Phase_2
displayName: Anti-malware Phase
cancelTimeoutInMinutes: 1
dependsOn: Phase_1
pool:
vmImage: $(vmImage)
steps:
- checkout: self
- task: DownloadBuildArtifacts@0
displayName: Download Nuget Artifacts
enabled: False
inputs:
buildVersionToDownload: specific
artifactName: nuget
- task: AntiMalware@3
displayName: Run MpCmdRun.exe
enabled: False
inputs:
FileDirPath: $(System.ArtifactsDirectory)
EnableServices: true
SignatureFreshness: OneDay
TreatStaleSignatureAs: Warning
- task: PublishSecurityAnalysisLogs@2
displayName: Publish Security Analysis Logs
enabled: False
inputs:
ArtifactName: CodeAnalysisLogs - Antimalware