Conversation
|
Removed flag enableSbom as we need this in all repos |
|
Could you test this in a repo that has multiple build legs? Both arcade and SDK only have a windows leg. |
There was a problem hiding this comment.
Some comments.
Your aspnetcore test failed to generate all linux sboms due to execute permissions for the prep script. Does it still have the execute flag set in git?
EDIT: Also, I'd like us to keep trying to use a common variables template so that we don't have to copy the same defaults in 3 different templates, but if it's proving difficult it's fine as a followup PR.
eng/common/templates/job/job.yml
Outdated
| continueOnError: ${{ parameters.continueOnError }} | ||
| condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) | ||
|
|
||
| - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
There was a problem hiding this comment.
Wondering why you're using two conditions instead of adding the sbom parameter check to this one?
There was a problem hiding this comment.
we do the same for microbuild, where we have enableMicrobuild in job.yml, so I used the same format... I will move it other condition
eng/common/templates/job/job.yml
Outdated
| - ${{ if eq(parameters.enableSbom, 'true') }}: | ||
| - template: /eng/common/templates/steps/generate-sbom.yml | ||
| parameters: | ||
| PackageVersion : $ {{ parameters.packageVersion}} |
There was a problem hiding this comment.
| PackageVersion : $ {{ parameters.packageVersion}} | |
| PackageVersion : ${{ parameters.packageVersion}} |
eng/common/templates/jobs/jobs.yml
Outdated
| enableSourceIndex: false | ||
| sourceIndexParams: {} | ||
|
|
||
There was a problem hiding this comment.
[nit] trailing space it looks like?
eng/common/templates/job/job.yml
Outdated
| name: '' | ||
| preSteps: [] | ||
| runAsPublic: false | ||
| #Sbom related params |
There was a problem hiding this comment.
| #Sbom related params | |
| # Sbom related params |
Here and everywhere
There was a problem hiding this comment.
added a space inbetween the comment and #
eng/common/templates/jobs/jobs.yml
Outdated
| name: NetCore1ESPool-Internal | ||
| demands: ImageOverride -equals Build.Server.Amd64.VS2019 | ||
|
|
||
| vmImage: 'windows-2019' |
There was a problem hiding this comment.
Make sure to not check in this testing change.
There was a problem hiding this comment.
removed this unwanted code
| # ManifestDirPath - The path of the directory where the generated manifest files will be placed | ||
|
|
||
| parameters: | ||
| PackageVersion: '' |
There was a problem hiding this comment.
The default is missing for the version.
There was a problem hiding this comment.
And for the BuildDropPath.
There was a problem hiding this comment.
Added above params in generete-sbom.yml
| sbomContinueOnError: true | ||
|
|
||
| steps: | ||
| - powershell: | |
There was a problem hiding this comment.
These scripts are still being called as if they were inline. You can take a look at how checked in scripts should be used with the tasks in a bunch of our other templates, such as:
arcade/eng/common/templates/job/publish-build-assets.yml
Lines 58 to 62 in c2af37f
There was a problem hiding this comment.
Updated to use the task instead of inline script
I added the link, it was late at night and didn't stick around for the entire test. I did add the execute script before I ran it last night. That did not work, so I will have to add chmod back in the script. I agree I need more time to test that template, I don't want to rush it. |
You mentioned you had a test where it had worked? |
|
I wonder if the Linux failure is related to my other comment of calling the task incorrectly? |
|
I did a test in arcade, unfortunately that does not have a linux leg. So it not work. |
|
I just checked out this branch: https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore?version=GBsbom So the file is not marked as executable. Make sure to run the command I shared before and commit the file again. |
riarenas
left a comment
There was a problem hiding this comment.
Assuming all tests work I think all I have remaining are nits.
Let's create a followup issue to make the templates source their default values from a common location though.
| condition: or(eq(variables['Agent.Os'], 'Windows_NT'), eq(variables['Agent.Os'], 'Darwin')) | ||
| inputs: | ||
| filePath: ./eng/common/generate-sbom-prep.ps1 | ||
| arguments: ${{parameters.manifestDirPath}} |
There was a problem hiding this comment.
Don't you need to pass -ManifestDirPath first so the script knows which parameter it is? or does this work because there's a single argument to the script?
Co-authored-by: Ricardo Arenas <riarenas@microsoft.com>
|
Hello @epananth! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
WOOHOO! |
|
Nice! Trying this out in machinelearning now dotnet/machinelearning#6076. |

To double check:
Generate sbom for arcade and repos using arcade