mirror of
https://github.com/anchore/grype
synced 2024-11-10 06:34:13 +00:00
use test config for schema validations
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
f99da01100
commit
d8aedf8117
4 changed files with 6 additions and 6 deletions
8
Makefile
8
Makefile
|
@ -219,13 +219,13 @@ changelog-unreleased: ## show the current changelog that will be produced on the
|
|||
-t 754.5889 \
|
||||
/CHANGELOG.md
|
||||
|
||||
.PHONY: validate-cli-test-config
|
||||
validate-cli-test-config:
|
||||
.PHONY: validate-grype-test-config
|
||||
validate-grype-test-config:
|
||||
# ensure the update URL is not overridden (not pointing to staging)
|
||||
@ grep -q "update-url" test/cli/cli-test-config.yaml && echo "Found 'update-url' in CLI testing config. Cannot release if previous CLI testing did not use production (default) values"
|
||||
@ grep -q "update-url" test/grype-test-config.yaml && echo "Found 'update-url' in CLI testing config. Cannot release if previous CLI testing did not use production (default) values"
|
||||
|
||||
.PHONY: release
|
||||
release: clean-dist validate-cli-test-config changelog-release ## Build and publish final binaries and packages. Intended to be run only on macOS.
|
||||
release: clean-dist validate-grype-test-config changelog-release ## Build and publish final binaries and packages. Intended to be run only on macOS.
|
||||
$(call title,Publishing release artifacts)
|
||||
|
||||
# Prepare for macOS-specific signing process
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.DEFAULT_GOAL := validate-schema
|
||||
.PHONY: validate-schema
|
||||
validate-schema:
|
||||
go run ../../main.go ubuntu:latest -vv -o cyclonedx > bom.xml
|
||||
go run ../../main.go -c ../../test/grype-test-config.yaml ubuntu:latest -vv -o cyclonedx > bom.xml
|
||||
xmllint --noout --schema ./cyclonedx.xsd bom.xml
|
|
@ -51,7 +51,7 @@ func getGrypeCommand(t testing.TB, args ...string) *exec.Cmd {
|
|||
return exec.Command(
|
||||
binaryLocation,
|
||||
append(
|
||||
[]string{"-c", "cli-test-config.yaml"},
|
||||
[]string{"-c", "../grype-test-config.yaml"},
|
||||
args...,
|
||||
)...,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue