Skip to content

Commit

Permalink
Update SBOM generation (PowerShell#16641)
Browse files Browse the repository at this point in the history
# Conflicts:
#	.vsts-ci/misc-analysis/mdSpell.yml

# Conflicts:
#	.vsts-ci/linux.yml
#	.vsts-ci/mac.yml
#	.vsts-ci/windows.yml
#	prquantifier.yaml
#	tools/cgmanifest.json
#	tools/findMissingNotices.ps1
#	tools/releaseBuild/azureDevOps/templates/compliance/compliance.yml
#	tools/releaseBuild/azureDevOps/templates/compliance/generateNotice.yml
#	tools/releaseBuild/azureDevOps/templates/windows-hosted-build.yml

# Conflicts:
#	.vsts-ci/linux.yml
  • Loading branch information
TravisEz13 committed Mar 11, 2022
1 parent f71203b commit 5616c42
Show file tree
Hide file tree
Showing 21 changed files with 1,786 additions and 76 deletions.
32 changes: 20 additions & 12 deletions .vsts-ci/linux.yml
Expand Up @@ -11,9 +11,10 @@ trigger:
include:
- '*'
exclude:
- /.vsts-ci/misc-analysis.yml
- /.github/ISSUE_TEMPLATE/*
- /.dependabot/config.yml
- .vsts-ci/misc-analysis.yml
- .github/ISSUE_TEMPLATE/*
- .dependabot/config.yml
- test/perf/*
pr:
branches:
include:
Expand All @@ -24,12 +25,17 @@ pr:
include:
- '*'
exclude:
- .dependabot/config.yml
- .github/ISSUE_TEMPLATE/*
- .vsts-ci/misc-analysis.yml
- .vsts-ci/windows.yml
- .vsts-ci/windows/*
- tools/cgmanifest.json
- LICENSE.txt
- test/common/markdown/*
- test/perf/*
- tools/releaseBuild/*
- tools/releaseBuild/azureDevOps/templates/*
- .vsts-ci/misc-analysis.yml
- .github/ISSUE_TEMPLATE/*
- .dependabot/config.yml

variables:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand All @@ -44,14 +50,14 @@ resources:
jobs:
- template: templates/ci-build.yml
parameters:
pool: ubuntu-16.04
pool: ubuntu-20.04
jobName: linux_build
displayName: linux Build

- template: templates/nix-test.yml
parameters:
name: Linux
pool: ubuntu-16.04
pool: ubuntu-20.04
purpose: UnelevatedPesterTests
tagSet: CI
parentJobs:
Expand All @@ -60,7 +66,7 @@ jobs:
- template: templates/nix-test.yml
parameters:
name: Linux
pool: ubuntu-16.04
pool: ubuntu-20.04
purpose: ElevatedPesterTests
tagSet: CI
parentJobs:
Expand All @@ -69,7 +75,7 @@ jobs:
- template: templates/nix-test.yml
parameters:
name: Linux
pool: ubuntu-16.04
pool: ubuntu-20.04
purpose: UnelevatedPesterTests
tagSet: Others
parentJobs:
Expand All @@ -78,20 +84,22 @@ jobs:
- template: templates/nix-test.yml
parameters:
name: Linux
pool: ubuntu-16.04
pool: ubuntu-20.04
purpose: ElevatedPesterTests
tagSet: Others
parentJobs:
- linux_build

- template: templates/verify-xunit.yml
parameters:
pool: ubuntu-16.04
pool: ubuntu-20.04
parentJobs:
- linux_build

- job: CodeCovTestPackage
displayName: CodeCoverage and Test Packages
pool:
vmImage: ubuntu-20.04
steps:
- powershell: |
Import-Module .\tools\ci.psm1
Expand Down
21 changes: 14 additions & 7 deletions .vsts-ci/mac.yml
Expand Up @@ -11,10 +11,11 @@ trigger:
include:
- '*'
exclude:
- /tools/releaseBuild/**/*
- /.vsts-ci/misc-analysis.yml
- /.github/ISSUE_TEMPLATE/*
- /.dependabot/config.yml
- tools/releaseBuild/**/*
- .vsts-ci/misc-analysis.yml
- .github/ISSUE_TEMPLATE/*
- .dependabot/config.yml
- test/perf/*
pr:
branches:
include:
Expand All @@ -25,10 +26,16 @@ pr:
include:
- '*'
exclude:
- test/common/markdown/*
- .vsts-ci/misc-analysis.yml
- .github/ISSUE_TEMPLATE/*
- .dependabot/config.yml
- .github/ISSUE_TEMPLATE/*
- .vsts-ci/misc-analysis.yml
- .vsts-ci/windows.yml
- .vsts-ci/windows/*
- tools/cgmanifest.json
- LICENSE.txt
- test/common/markdown/*
- test/perf/*
- tools/packaging/*
- tools/releaseBuild/*
- tools/releaseBuild/azureDevOps/templates/*

Expand Down
56 changes: 56 additions & 0 deletions .vsts-ci/misc-analysis/mdSpell.yml
@@ -0,0 +1,56 @@
jobs:
- job: markdown
displayName: Markdown Spelling

pool:
vmImage: ubuntu-20.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
condition: succeededOrFailed()
- bash: |
curl -o- --progress-bar -L https://yarnpkg.com/install.sh | bash
displayName: Bootstrap Yarn
condition: succeededOrFailed()
- bash: |
sudo yarn global add markdown-spellcheck@0.11.0
displayName: Install mdspell
condition: succeededOrFailed()
- bash: |
mdspell '**/*.md' '!**/Pester/**/*.md' '!**/dotnet-tools/**/*.md' --ignore-numbers --ignore-acronyms --report --en-us;
displayName: Test Spelling in Markdown
condition: succeededOrFailed()
workingDirectory: '$(repoPath)'
- ${{ if not(contains(variables['SYSTEM.COLLECTIONURI'],'mscodehub')) }}:
- pwsh: |
Import-module ./build.psm1
$path = Join-Path -Path $pwd -ChildPath './commonTestResults.xml'
$results = invoke-pester -Script ./test/common/markdown-lint -OutputFile $path -OutputFormat NUnitXml -PassThru
Write-Host "##vso[results.publish type=NUnit;mergeResults=true;runTitle=Markdown Lint;publishRunAttachments=true;resultFiles=$path;]"
if($results.TotalCount -eq 0 -or $results.FailedCount -gt 0)
{
throw "Markdown tests failed"
}
displayName: Run Markdown Lint Tests
condition: succeededOrFailed()
workingDirectory: '$(repoPath)'
- template: dailyBuildCompliance.yml@ComplianceRepo
parameters:
sourceScanPath: '$(repoPath)/test/common'
1 change: 1 addition & 0 deletions .vsts-ci/templates/windows-packaging.yml
Expand Up @@ -61,6 +61,7 @@ jobs:
BuildDropPath: '$(System.ArtifactsDirectory)/mainBuild'
Build_Repository_Uri: $(build.repository.uri)
displayName: SBOM
sourceScanPath: '$(repoPath)\tools'

- pwsh: |
Import-Module .\tools\ci.psm1
Expand Down
17 changes: 11 additions & 6 deletions .vsts-ci/windows.yml
Expand Up @@ -11,9 +11,10 @@ trigger:
include:
- '*'
exclude:
- /.vsts-ci/misc-analysis.yml
- /.github/ISSUE_TEMPLATE/*
- /.dependabot/config.yml
- .vsts-ci/misc-analysis.yml
- .github/ISSUE_TEMPLATE/*
- .dependabot/config.yml
- test/perf/*
pr:
branches:
include:
Expand All @@ -24,12 +25,16 @@ pr:
include:
- '*'
exclude:
- .vsts-ci/misc-analysis.yml
- .github/ISSUE_TEMPLATE/*
- .dependabot/config.yml
- .github/ISSUE_TEMPLATE/*
- .vsts-ci/misc-analysis.yml
- tools/cgmanifest.json
- LICENSE.txt
- test/common/markdown/*
- test/perf/*
- tools/packaging/*
- tools/releaseBuild/*
- tools/releaseBuild/azureDevOps/templates/*
- test/common/markdown/*

variables:
GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"
Expand Down

0 comments on commit 5616c42

Please sign in to comment.