Skip to content

Commit

Permalink
chore: remove quality gate Makefile db age check (#2036)
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Zantow <kzantow@gmail.com>
  • Loading branch information
kzantow authored Aug 12, 2024
1 parent 4ec46b5 commit b12a6f2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions test/quality/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ RESULT_SET = pr_vs_latest_via_sbom
TEST_DB_URL_FILE = ./test-db-url
TEST_DB_URL = $(shell cat $(TEST_DB_URL_FILE))
TEST_DB = db.tar.gz
LISTING_FILE = https://toolbox-data.anchore.io/grype/databases/listing.json

# formatting variables
BOLD := $(shell tput -T linux bold)
Expand All @@ -34,15 +33,9 @@ validate: venv $(VULNERABILITY_LABELS)/Makefile ## Run all quality checks agains
capture: sboms vulns ## Collect and store all syft and grype results

.PHONY: capture
vulns: venv $(TEST_DB) check-db ## Collect and store all grype results
vulns: venv $(TEST_DB) ## Collect and store all grype results
$(YARDSTICK) -v result capture -r $(RESULT_SET)

.PHONY: check-db
check-db:
@echo "Looking for test DB within the hosted listing file (which prunes DBs older that 90 days or the last 90 objects)"
@curl -sSL $(LISTING_FILE) | jq '.available[][] | select(.url == "$(TEST_DB_URL)") ' --exit-status || (echo "$(RED)DB is too stale to be used for testing. Please re-pin with a more up-to-date version.$(RESET)" && false)
@echo "DB is fresh enough to be used for testing!"

$(TEST_DB):
@curl -o $(TEST_DB) -SsL $(TEST_DB_URL)

Expand Down

0 comments on commit b12a6f2

Please sign in to comment.