Skip to content

Commit

Permalink
chore: switch to yardstick validate from custom gate.py
Browse files Browse the repository at this point in the history
Signed-off-by: Will Murphy <[email protected]>
  • Loading branch information
willmurphyscode committed Aug 29, 2024
1 parent 7901a57 commit 832391c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 347 deletions.
7 changes: 7 additions & 0 deletions test/quality/.yardstick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ default_max_year: 2021
result-sets:
pr_vs_latest_via_sbom:
description: "latest released grype vs grype from the current build (via SBOM ingestion)"
validations:
- max-f1-regression: 0.0
max-new-false-negatives: 00
max-unlabeled-percent: 10
max_year: 2021
matrix:
images: *images

Expand All @@ -112,6 +117,7 @@ result-sets:
# for local build of grype, use for example:
version: path:../../+import-db=db.tar.gz
takes: SBOM
label: candidate

- name: grype
# note: we import a static (pinned) DB as to prevent changes in the DB from affecting the results. The
Expand All @@ -121,3 +127,4 @@ result-sets:
# are testing with is not too stale.
version: latest+import-db=db.tar.gz
takes: SBOM
label: reference
2 changes: 1 addition & 1 deletion test/quality/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ all: capture validate ## Fetch or capture all data and run all quality checks

.PHONY: validate
validate: venv $(VULNERABILITY_LABELS)/Makefile ## Run all quality checks against already collected data
$(ACTIVATE_VENV) ./gate.py
$(ACTIVATE_VENV) yardstick validate -r $(RESULT_SET)

.PHONY: capture
capture: sboms vulns ## Collect and store all syft and grype results
Expand Down
345 changes: 0 additions & 345 deletions test/quality/gate.py

This file was deleted.

2 changes: 1 addition & 1 deletion test/quality/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
git+https://github.com/anchore/yardstick@v0.9.1
git+https://github.com/anchore/yardstick@feat-validate-subcommand
# ../../../yardstick
tabulate==0.9.0

0 comments on commit 832391c

Please sign in to comment.