8000 Update SBOM generation (#16641) · daxian-dbw/PowerShell@5616c42 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5616c42

Browse files
committed
Update SBOM generation (PowerShell#16641)
# 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
1 parent f71203b commit 5616c42

21 files changed

+1786
-76
lines changed

.vsts-ci/linux.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ trigger:
1111
include:
1212
- '*'
1313
exclude:
14-
- /.vsts-ci/misc-analysis.yml
15-
- /.github/ISSUE_TEMPLATE/*
16-
- /.dependabot/config.yml
14+
- .vsts-ci/misc-analysis.yml
15+
- .github/ISSUE_TEMPLATE/*
16+
- .dependabot/config.yml
17+
- test/perf/*
1718
pr:
1819
branches:
1920
include:
@@ -24,12 +25,17 @@ pr:
2425
include:
2526
- '*'
2627
exclude:
28+
- .dependabot/config.yml
29+
- .github/ISSUE_TEMPLATE/*
30+
- .vsts-ci/misc-analysis.yml
31+
- .vsts-ci/windows.yml
32+
- .vsts-ci/windows/*
33+
- tools/cgmanifest.json
34+
- LICENSE.txt
2735
- test/common/markdown/*
36+
- test/perf/*
2837
- tools/releaseBuild/*
2938
- tools/releaseBuild/azureDevOps/templates/*
30-
- .vsts-ci/misc-analysis.yml
31-
- .github/ISSUE_TEMPLATE/*
32-
- .dependabot/config.yml
3339

3440
variables:
3541
DOTNET_CLI_TELEMETRY_OPTOUT: 1
@@ -44,14 +50,14 @@ resources:
4450
jobs:
4551
- template: templates/ci-build.yml
4652
parameters:
47-
pool: ubuntu-16.04
53+
pool: ubuntu-20.04
4854
jobName: linux_build
4955
displayName: linux Build
5056

5157
- template: templates/nix-test.yml
5258
parameters:
5359
name: Linux
54-
pool: ubuntu-16.04
60+
pool: ubuntu-20.04
5561
purpose: UnelevatedPesterTests
5662
tagSet: CI
5763
parentJobs:
@@ -60,7 +66,7 @@ jobs:
6066
- template: templates/nix-test.yml
6167
parameters:
6268
name: Linux
63-
pool: ubuntu-16.04
69+
pool: ubuntu-20.04
6470
purpose: ElevatedPesterTests
6571
tagSet: CI
6672
parentJobs:
@@ -69,7 +75,7 @@ jobs:
6975
- template: templates/nix-test.yml
7076
parameters:
7177
name: Linux
72-
pool: ubuntu-16.04
78+
pool: ubuntu-20.04
7379
purpose: UnelevatedPesterTests
7480
tagSet: Others
7581
parentJobs:
@@ -78,20 +84,22 @@ jobs:
7884
- template: templates/nix-test.yml
7985
parameters:
8086
name: Linux
81-
pool: ubuntu-16.04
87+
pool: ubuntu-20.04
8288
purpose: ElevatedPesterTests
8389
tagSet: Others
8490
parentJobs:
8591
- linux_build
8692

8793
- template: templates/verify-xunit.yml
8894
parameters:
89-
pool: ubuntu-16.04
95+
pool: ubuntu-20.04
9096
parentJobs:
9197
- linux_build
9298

9399
- job: CodeCovTestPackage
94100
displayName: CodeCoverage and Test Packages
101+
pool:
102+
vmImage: ubuntu-20.04
95103
steps:
96104
- powershell: |
97105
Import-Module .\tools\ci.psm1

.vsts-ci/mac.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ trigger:
1111
include:
1212
- '*'
1313
exclude:
14-
- /tools/releaseBuild/**/*
15-
- /.vsts-ci/misc-analysis.yml
16-
- /.github/ISSUE_TEMPLATE/*
17-
- /.dependabot/config.yml
14+
- tools/releaseBuild/**/*
15+
- .vsts-ci/misc-analysis.yml
16+
- .github/ISSUE_TEMPLATE/*
17+
- .dependabot/config.yml
18+
- test/perf/*
1819
pr:
1920
branches:
2021
include:
@@ -25,10 +26,16 @@ pr:
2526
include:
2627
- '*'
2728
exclude:
28-
- test/common/markdown/*
29-
- .vsts-ci/misc-analysis.yml
30-
- .github/ISSUE_TEMPLATE/*
3129
- .dependabot/config.yml
30+
- .github/ISSUE_TEMPLATE/*
31+
- .vsts-ci/misc-analysis.yml
32+
- .vsts-ci/windows.yml
33+
- .vsts-ci/windows/*
34+
- tools/cgmanifest.json
35+
- LICENSE.txt
36+
- test/common/markdown/*
37+
- test/perf/*
38+
- tools/packaging/*
3239
- tools/releaseBuild/*
3340
- tools/releaseBuild/azureDevOps/templates/*
3441

.vsts-ci/misc-analysis/mdSpell.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
jobs:
2+
- job: markdown
3+
displayName: Markdown Spelling
4+
5+
pool:
6+
vmImage: ubuntu-20.04
7+
8+
variables:
9+
- name: repoPath
10+
value: $(Agent.BuildDirectory)/$(repoFolder)
11+
12+
steps:
13+
- checkout: self
14+
clean: true
15+
path: $(repoFolder)
16+
17+
- checkout: ComplianceRepo
18+
19+
- powershell: |
20+
Get-ChildItem -Path env:
21+
displayName: Capture Environment
22+
condition: succeededOrFailed()
23+
24+
- bash: |
25+
curl -o- --progress-bar -L https://yarnpkg.com/install.sh | bash
26+
displayName: Bootstrap Yarn
27+
condition: succeededOrFailed()
28+
29+
- bash: |
30+
sudo yarn global add markdown-spellcheck@0.11.0
31+
displayName: Install mdspell
32+
condition: succeededOrFailed()
33+
34+
- bash: |
35+
mdspell '**/*.md' '!**/Pester/**/*.md' '!**/dotnet-tools/**/*.md' --ignore-numbers --ignore-acronyms --report --en-us;
36+
displayName: Test Spelling in Markdown
37+
condition: succeededOrFailed()
38+
workingDirectory: '$(repoPath)'
39+
40+
- ${{ if not(contains(variables['SYSTEM.COLLECTIONURI'],'mscodehub')) }}:
41+
- pwsh: |
42+
Import-module ./build.psm1
43+
$path = Join-Path -Path $pwd -ChildPath './commonTestResults.xml'
44+
$results = invoke-pester -Script ./test/common/markdown-lint -OutputFile $path -OutputFormat NUnitXml -PassThru
45+
Write-Host "##vso[results.publish type=NUnit;mergeResults=true;runTitle=Markdown Lint;publishRunAttachments=true;resultFiles=$path;]"
46+
if($results.TotalCount -eq 0 -or $results.FailedCount -gt 0)
47+
{
48+
throw "Markdown tests failed"
49+
}
50+
displayName: Run Markdown Lint Tests
51+
condition: succeededOrFailed()
52+
workingDirectory: '$(repoPath)'
53+
54+
- template: dailyBuildCompliance.yml@ComplianceRepo
55+
parameters:
56+
sourceScanPath: '$(repoPath)/test/common'

.vsts-ci/templates/windows-packaging.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
BuildDropPath: '$(System.ArtifactsDirectory)/mainBuild'
6262
Build_Repository_Uri: $(build.repository.uri)
6363
displayName: SBOM
64+
sourceScanPath: '$(repoPath)\tools'
6465

6566
- pwsh: |
6667
Import-Module .\tools\ci.psm1

.vsts-ci/windows.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ trigger:
1111
include:
1212
- '*'
1313
exclude:
14-
- /.vsts-ci/misc-analysis.yml
15-
- /.github/ISSUE_TEMPLATE/*
16-
- /.dependabot/config.yml
14+
- .vsts-ci/misc-analysis.yml
15+
- .github/ISSUE_TEMPLATE/*
16+
- .dependabot/config.yml
17+
- test/perf/*
1718
pr:
1819
branches:
1920
include:
@@ -24,12 +25,16 @@ pr:
2425
include:
2526
- '*'
2627
exclude:
27-
- .vsts-ci/misc-analysis.yml
28-
- .github/ISSUE_TEMPLATE/*
2928
- .dependabot/config.yml
29+
- .github/ISSUE_TEMPLATE/*
30+
- .vsts-ci/misc-analysis.yml
31+
- tools/cgmanifest.json
32+
- LICENSE.txt
33+
- test/common/markdown/*
34+
- test/perf/*
35+
- tools/packaging/*
3036
- tools/releaseBuild/*
3137
- tools/releaseBuild/azureDevOps/templates/*
32-
- test/common/markdown/*
3338

3439
variables:
3540
GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"

0 commit comments

Comments
 (0)
0