Skip to content

Commit 6f2a8be

Browse files
committed
Move SBOM check to checkout command
1 parent 8d521d1 commit 6f2a8be

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

windows-release/checkout.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,13 @@ steps:
3535
${{ if and(parameters.Path, ne(parameters.Path, '.')) }}:
3636
workingDirectory: ${{ parameters.Path }}
3737
condition: and(succeeded(), variables['SourceCommit'])
38+
39+
- powershell: |
40+
if (-not (Test-Path "Misc\externals.spdx.json")) {
41+
"externals.spdx.json is missing - skipping SBOM"
42+
Write-Host "##vso[task.setvariable variable=SkipSBOM]1"
43+
}
44+
displayName: 'Checking for SBOM inputs'
45+
${{ if and(parameters.Path, ne(parameters.Path, '.')) }}:
46+
workingDirectory: ${{ parameters.Path }}
47+
condition: and(succeeded(), not(variables['SkipSBOM']))

windows-release/stage-layout-embed.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@ jobs:
6565
git -C "$(Pipeline.Workspace)\release-tools" checkout $(Build.SourceVersion)
6666
displayName: 'Clone the python/release-tools repository'
6767
68-
- powershell: |
69-
if (-not (Test-Path "$(Build.SourcesDirectory)\Misc\externals.spdx.json")) {
70-
"externals.spdx.json is missing - skipping SBOM"
71-
Write-Host "##vso[task.setvariable variable=SkipSBOM]1"
72-
}
73-
condition: and(succeeded(), not(variables['SkipSBOM']))
74-
displayName: 'Checking for SBOM'
75-
7668
- powershell: >
7769
& "$(Python)"
7870
"$(Pipeline.Workspace)\release-tools\sbom.py"

0 commit comments

Comments
 (0)