2019-09-11 10:41:07 +02:00
|
|
|
SRC := ./BuildSourceImage.sh
|
2019-09-11 11:45:53 +02:00
|
|
|
CTR_IMAGE := localhost/containers/buildsourceimage
|
2019-09-11 11:13:02 +02:00
|
|
|
CTR_ENGINE ?= podman
|
2019-09-11 10:41:07 +02:00
|
|
|
|
|
|
|
all: validate
|
|
|
|
|
|
|
|
.PHONY: validate
|
|
|
|
validate: $(SRC)
|
2019-09-11 11:13:02 +02:00
|
|
|
shellcheck $(SRC)
|
2019-09-11 11:45:53 +02:00
|
|
|
|
|
|
|
.PHONY: build-container
|
|
|
|
build-container: Dockerfile
|
2019-09-11 11:13:02 +02: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/
|