Skip to content

Commit f390dc9

Browse files
committed
Remove everything SBOM related
1 parent 5f9d49a commit f390dc9

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

scripts/release/atomic_pipeline.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
sign_image,
2222
verify_signature,
2323
)
24-
from scripts.evergreen.release.sbom import generate_sbom, generate_sbom_for_cli
2524

2625
from .build_configuration import BuildConfiguration
2726
from .build_context import BuildScenario
@@ -59,7 +58,6 @@ def pipeline_process_image(
5958
build_configuration: BuildConfiguration,
6059
dockerfile_args: Dict[str, str] = None,
6160
build_path: str = ".",
62-
with_sbom: bool = True,
6361
):
6462
"""Builds a Docker image with arguments defined in `args`."""
6563
span = trace.get_current_span()
@@ -83,46 +81,6 @@ def pipeline_process_image(
8381
build_path=build_path,
8482
)
8583

86-
if with_sbom:
87-
produce_sbom(dockerfile_args)
88-
89-
90-
@TRACER.start_as_current_span("produce_sbom")
91-
def produce_sbom(args):
92-
span = trace.get_current_span()
93-
if not is_running_in_evg_pipeline():
94-
logger.info("Skipping SBOM Generation (enabled only for EVG)")
95-
return
96-
97-
try:
98-
image_pull_spec = args["quay_registry"] + args.get("ubi_suffix", "")
99-
except KeyError:
100-
logger.error(f"Could not find image pull spec. Args: {args}")
101-
logger.error(f"Skipping SBOM generation")
102-
return
103-
104-
try:
105-
image_tag = args["release_version"]
106-
span.set_attribute("mck.release_version", image_tag)
107-
except KeyError:
108-
logger.error(f"Could not find image tag. Args: {args}")
109-
logger.error(f"Skipping SBOM generation")
110-
return
111-
112-
image_pull_spec = f"{image_pull_spec}:{image_tag}"
113-
print(f"Producing SBOM for image: {image_pull_spec} args: {args}")
114-
115-
platform = "linux/amd64"
116-
if "platform" in args:
117-
if args["platform"] == "arm64":
118-
platform = "linux/arm64"
119-
elif args["platform"] == "amd64":
120-
platform = "linux/amd64"
121-
else:
122-
raise ValueError(f"Unrecognized platform in {args}. Cannot proceed with SBOM generation")
123-
124-
generate_sbom(image_pull_spec, platform)
125-
12684

12785
def build_tests_image(build_configuration: BuildConfiguration):
12886
"""
@@ -338,7 +296,6 @@ def build_image_generic(
338296
dockerfile_path=dockerfile_path,
339297
build_configuration=build_configuration,
340298
dockerfile_args=build_args,
341-
with_sbom=False, # TODO: specify no SBOM, write folllow up tasks and todo
342299
)
343300

344301
if build_configuration.sign:

0 commit comments

Comments
 (0)