56 lines
963 B
Makefile
Raw Normal View History

DOCKER_TAG ?= docker-restic-cron
2017-06-28 18:12:49 -07:00
2021-06-14 15:55:26 -07:00
.PHONY: all
all: check test-all
.PHONY: default
2017-06-28 18:12:49 -07:00
default: build-x86
.PHONY: test
test: test-x86
.PHONY: build-x86
2017-06-28 18:12:49 -07:00
build-x86:
2018-08-12 17:30:53 -07:00
docker build -f ./Dockerfile -t $(DOCKER_TAG) .
2017-06-28 18:12:49 -07:00
.PHONY: build-arm
2017-06-28 18:12:49 -07:00
build-arm:
2020-02-10 17:49:39 -08:00
docker build --build-arg REPO=arm32v7 -f ./Dockerfile -t $(DOCKER_TAG)-arm32v7 .
2017-06-28 18:12:49 -07:00
.PHONY: build-all
2017-06-28 18:12:49 -07:00
build-all: build-x86 build-arm
.PHONY: test-x86
2017-06-28 18:12:49 -07:00
test-x86: build-x86
cd tests && ./test.sh $(DOCKER_TAG)
cd tests && ./test-pre-scripts.sh $(DOCKER_TAG)
2017-06-28 18:12:49 -07:00
.PHONY: test-all
2017-06-28 18:12:49 -07:00
test-all: test-x86 test-arm
2017-07-16 19:37:03 -07:00
.PHONY: test-s3-x86
test-s3-x86:
2018-05-13 10:31:31 -07:00
cd tests && ./test-s3.sh ubuntu
.PHONY: test-s3-all
test-s3-all: test-s3-x86 test-s3-arm
.PHONY: shell-x86
2017-07-16 19:37:03 -07:00
shell-x86: build-x86
docker run --rm -it $(DOCKER_TAG) bash
2017-07-16 19:37:03 -07:00
.PHONY: shell
2017-07-16 19:37:03 -07:00
shell: shell-x86
.PHONY: clean
clean:
docker-compose -f docker-compose-test-s3.yml down -v
2021-06-14 15:55:26 -07:00
.PHONY: install-hooks
install-hooks:
pre-commit install
.PHONY: check
check:
pre-commit run --all-files