2019-09-11 08:41:07 +00:00
|
|
|
SRC := ./BuildSourceImage.sh
|
2019-09-11 09:45:53 +00:00
|
|
|
CTR_IMAGE := localhost/containers/buildsourceimage
|
2019-09-11 09:13:02 +00:00
|
|
|
CTR_ENGINE ?= podman
|
2019-09-11 08:41:07 +00:00
|
|
|
|
|
|
|
all: validate
|
|
|
|
|
|
|
|
.PHONY: validate
|
|
|
|
validate: $(SRC)
|
2019-09-11 09:13:02 +00:00
|
|
|
shellcheck $(SRC)
|
2019-09-11 09:45:53 +00:00
|
|
|
|
|
|
|
.PHONY: build-container
|
|
|
|
build-container: Dockerfile
|
2019-09-11 09:13:02 +00:00
|
|
|
@echo
|
|
|
|
@echo "Building BuildSourceImage Container"
|
|
|
|
$(CTR_ENGINE) build --quiet --file Dockerfile --tag $(CTR_IMAGE) .
|
|
|
|
|
|
|
|
.PHONY: test-integration
|
|
|
|
test-integration: build-container
|
|
|
|
@echo
|
|
|
|
@echo "Running integration tests"
|
|
|
|
CTR_IMAGE=$(CTR_IMAGE) CTR_ENGINE=$(CTR_ENGINE) bats test/
|