Skip to content

Commit 6839249

Browse files
committed
update snapshot verify, and bump report version
1 parent 03e5ab6 commit 6839249

File tree

6 files changed

+11
-104
lines changed

6 files changed

+11
-104
lines changed

.github/workflows/snapshot-verify.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Verify snapshot of test scan
22

33
env:
44
CD_DETECTOR_EXPERIMENTS: 1
5+
PipReportSkipFallbackOnFailure: "true"
6+
PIP_INDEX_URL: "https://pypi.python.org/simple"
57

68
on: [pull_request]
79

@@ -83,7 +85,7 @@ jobs:
8385
run:
8486
dotnet run scan --Verbosity Verbose --SourceDirectory ${{ github.workspace }}/test/Microsoft.ComponentDetection.VerificationTests/resources --Output ${{ github.workspace }}/output
8587
--DockerImagesToScan "docker.io/library/debian@sha256:9b0e3056b8cd8630271825665a0613cc27829d6a24906dc0122b3b4834312f7d,mcr.microsoft.com/cbl-mariner/base/core@sha256:c1bc83a3d385eccbb2f7f7da43a726c697e22a996f693a407c35ac7b4387cd59,docker.io/library/alpine@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870"
86-
--DetectorArgs DockerReference=EnableIfDefaultOff,SPDX22SBOM=EnableIfDefaultOff,SimplePip=EnableIfDefaultOff
88+
--DetectorArgs DockerReference=EnableIfDefaultOff,SPDX22SBOM=EnableIfDefaultOff --MaxDetectionThreads 5
8789

8890
- name: Run Verification Tests
8991
working-directory: test/Microsoft.ComponentDetection.VerificationTests

src/Microsoft.ComponentDetection.Detectors/pip/PipReportComponentDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private enum PipReportOverrideBehavior
7979

8080
public override IEnumerable<ComponentType> SupportedComponentTypes { get; } = [ComponentType.Pip];
8181

82-
public override int Version { get; } = 8;
82+
public override int Version { get; } = 9;
8383

8484
protected override bool EnableParallelism { get; set; } = true;
8585

test/Microsoft.ComponentDetection.VerificationTests/resources/VerificationTest.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,25 @@ function main()
3232
mkdir $output
3333
mkdir $releaseOutput
3434

35+
$env:PipReportSkipFallbackOnFailure = "true"
36+
$env:PIP_INDEX_URL="https://pypi.python.org/simple"
37+
3538
Write-Progress "Running detection....."
3639
Set-Location (Get-Item $repoPath).FullName
3740
dotnet restore
3841
Set-Location ((Get-Item $repoPath).FullName + "\src\Microsoft.ComponentDetection")
3942
dotnet run scan --SourceDirectory $verificationTestRepo --Output $output `
4043
--DockerImagesToScan $dockerImagesToScan `
41-
--DetectorArgs DockerReference=EnableIfDefaultOff,SPDX22SBOM=EnableIfDefaultOff,CondaLock=EnableIfDefaultOff,ConanLock=EnableIfDefaultOff
44+
--DetectorArgs DockerReference=EnableIfDefaultOff,SPDX22SBOM=EnableIfDefaultOff,CondaLock=EnableIfDefaultOff,ConanLock=EnableIfDefaultOff `
45+
--MaxDetectionThreads 5 --DebugTelemetry
4246

4347
Set-Location $CDRelease
4448
dotnet restore
4549
Set-Location ($CDRelease + "\src\Microsoft.ComponentDetection")
4650
dotnet run scan --SourceDirectory $verificationTestRepo --Output $releaseOutput `
4751
--DockerImagesToScan $dockerImagesToScan `
48-
--DetectorArgs DockerReference=EnableIfDefaultOff,SPDX22SBOM=EnableIfDefaultOff,CondaLock=EnableIfDefaultOff,ConanLock=EnableIfDefaultOff
52+
--DetectorArgs DockerReference=EnableIfDefaultOff,SPDX22SBOM=EnableIfDefaultOff,CondaLock=EnableIfDefaultOff,ConanLock=EnableIfDefaultOff `
53+
--MaxDetectionThreads 5 --DebugTelemetry
4954

5055
$env:GITHUB_OLD_ARTIFACTS_DIR = $releaseOutput
5156
$env:GITHUB_NEW_ARTIFACTS_DIR = $output

test/Microsoft.ComponentDetection.VerificationTests/resources/pip/pytestresultpkg/python/setup.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

test/Microsoft.ComponentDetection.VerificationTests/resources/pip/pytestresultpkg/python/src/pytest_pyresultreport/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

test/Microsoft.ComponentDetection.VerificationTests/resources/pip/pytestresultpkg/python/src/pytest_pyresultreport/plugin.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)