SERVER-114420 Update variant, task, and test for automated SBOM generation (#44413)

GitOrigin-RevId: 8c1a8cfd824ad4ead01a51f6dc035484848745ad
This commit is contained in:
Jason Hills 2025-11-26 16:55:32 -05:00 committed by MongoDB Bot
parent 50a0bccdbe
commit b336ccde1e
5 changed files with 18 additions and 6 deletions

1
.github/CODEOWNERS vendored
View File

@ -308,6 +308,7 @@ WORKSPACE.bazel @10gen/devprod-build @svc-auto-approve-bot
# The following patterns are parsed from ./buildscripts/tests/OWNERS.yml
/buildscripts/tests/ @10gen/devprod-build @svc-auto-approve-bot
/buildscripts/tests/test_evergreen_task_timeout.py @10gen/devprod-correctness @svc-auto-approve-bot
/buildscripts/tests/test_generate_sbom.py @10gen/code-review-team-ssdlc @svc-auto-approve-bot
# The following patterns are parsed from ./buildscripts/tests/burn_in_tests_end2end/OWNERS.yml
/buildscripts/tests/burn_in_tests_end2end/ @10gen/devprod-correctness @svc-auto-approve-bot

View File

@ -6,3 +6,6 @@ filters:
- "test_evergreen_task_timeout.py":
approvers:
- 10gen/devprod-correctness
- "test_generate_sbom.py":
approvers:
- 10gen/code-review-team-ssdlc

View File

@ -1,13 +1,19 @@
#!/usr/bin/env python3
"""
Tests for buildscripts/sbom/*.py
"""
import json
import logging
import os
import sys
import unittest
sys.path.append(".")
sys.path.append("buildscripts/sbom")
from buildscripts.sbom.config import get_semver_from_release_version, is_valid_purl, regex_semver
from buildscripts.sbom.config import get_semver_from_release_version, regex_semver
from buildscripts.sbom.endorctl_utils import EndorCtl
from buildscripts.sbom.generate_sbom import is_valid_purl
logging.basicConfig(level=logging.INFO, stream=sys.stdout)

View File

@ -1898,6 +1898,7 @@ tasks:
- "--endorctl-path=${workdir}/endorctl"
- "--config-path=${workdir}/.endorctl"
- "--namespace=${ENDOR_NAMESPACE}"
- "--save-warnings=${workdir}/generate_sbom_py_warnings.txt"
- command: subprocess.exec
display_name: Generate third-party readme file
params:
@ -1918,8 +1919,9 @@ tasks:
- "--github-owner=${github_org}"
- "--github-repo=${github_repo}"
- "--base-branch=${branch_name}"
- "--new-branch=SERVER-111072/sbom_update_${revision}"
- "--pr-title=SERVER-111072 Auto-generated SBOM files [${branch_name}] ${revision}"
- "--new-branch=SERVER-111072/sbom_update_${branch_name}"
- "--pr-title=SERVER-111072 Auto-generated SBOM files [${branch_name}]"
- "--saved-warnings=${workdir}/generate_sbom_py_warnings.txt"
- name: upload_sbom_via_silkbomb_if_changed
allowed_requesters: ["commit"]

View File

@ -113,8 +113,8 @@ buildvariants:
display_name: "Generate SBOM files and create PR"
# Don't run as part of patch builds
patchable: false
# Run at 6 am UTC daily
cron: "0 6 * * *"
# Run at 6 am UTC Mon-Fri
cron: "0 6 * * 1-5"
run_on: rhel92-small
expansions:
ENDOR_NAMESPACE: mongodb.10gen