Use template that disables component governance for CI (#14938)

This commit is contained in:
Travis Plunk 2021-03-04 10:16:56 -08:00 committed by GitHub
parent 9aede0558a
commit 749d24e281
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,18 +16,54 @@ pr:
- feature*
resources:
- repo: self
clean: true
repositories:
- repository: ComplianceRepo
type: github
endpoint: PowerShell
name: PowerShell/compliance
ref: master
variables:
- name: repoFolder
value: PowerShell
jobs:
- template: templates/credscan.yml
- job: CI_Compliance
displayName: CI Compliance
pool:
vmImage: windows-latest
variables:
- name: repoPath
value: $(Agent.BuildDirectory)\$(repoFolder)
steps:
- checkout: self
clean: true
path: $(repoFolder)
- checkout: ComplianceRepo
- template: ci-compliance.yml@ComplianceRepo
- job: Linux_CI
displayName: Markdown and Common Tests
pool:
name: Hosted Ubuntu 1604
vmImage: ubuntu-16.04
variables:
- name: repoPath
value: $(Agent.BuildDirectory)/$(repoFolder)
steps:
- checkout: self
clean: true
path: $(repoFolder)
- checkout: ComplianceRepo
- powershell: |
Get-ChildItem -Path env:
displayName: Capture Environment
@ -48,16 +84,13 @@ jobs:
displayName: Install mdspell
condition: succeededOrFailed()
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
displayName: Set Build Name for Non-PR
condition: ne(variables['Build.Reason'], 'PullRequest')
- bash: |
mdspell '**/*.md' '!**/Pester/**/*.md' --ignore-numbers --ignore-acronyms --report --en-us;
displayName: Test Spelling in Markdown
condition: succeededOrFailed()
workingDirectory: '$(repoPath)'
- powershell: |
- pwsh: |
Import-module ./build.psm1
$path = Join-Path -Path $pwd -ChildPath './commonTestResults.xml'
$results = invoke-pester -Script ./test/common -OutputFile $path -OutputFormat NUnitXml -PassThru
@ -68,8 +101,8 @@ jobs:
}
displayName: Run Common Tests
condition: succeededOrFailed()
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
inputs:
sourceScanPath: '$(Build.SourcesDirectory)'
snapshotForceEnabled: true
workingDirectory: '$(repoPath)'
- template: dailyBuildCompliance.yml@ComplianceRepo
parameters:
sourceScanPath: '$(repoPath)'