2017-06-29 01:12:49 +00:00
|
|
|
DOCKER_TAG ?= docker-duplicity-cron
|
|
|
|
|
2017-11-15 19:02:12 +00:00
|
|
|
.PHONY: default
|
2020-02-11 21:28:19 +00:00
|
|
|
default: build-amd64
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: build-all test-all test-s3-all
|
2017-06-29 01:12:49 +00:00
|
|
|
|
2017-11-15 19:02:12 +00:00
|
|
|
.PHONY: test
|
2020-02-11 21:28:19 +00:00
|
|
|
test: test-amd64
|
2017-07-30 19:18:12 +00:00
|
|
|
|
2020-02-11 21:28:19 +00:00
|
|
|
.PHONY: build-amd64
|
|
|
|
build-amd64:
|
|
|
|
docker build --build-arg REPO=library -f ./Dockerfile -t $(DOCKER_TAG):amd64 .
|
2017-06-29 01:12:49 +00:00
|
|
|
|
2017-11-15 19:02:12 +00:00
|
|
|
.PHONY: build-arm
|
2017-06-29 01:12:49 +00:00
|
|
|
build-arm:
|
2020-02-11 21:28:19 +00:00
|
|
|
docker build --build-arg REPO=arm32v7 -f ./Dockerfile -t $(DOCKER_TAG):arm .
|
2017-06-29 01:12:49 +00:00
|
|
|
|
2017-11-15 19:02:12 +00:00
|
|
|
.PHONY: build-all
|
2020-02-11 21:28:19 +00:00
|
|
|
build-all: build-amd64 build-arm
|
2017-06-29 01:12:49 +00:00
|
|
|
|
2020-02-11 21:28:19 +00:00
|
|
|
.PHONY: test-amd64
|
|
|
|
test-amd64: build-amd64
|
|
|
|
cd tests && ./test.sh $(DOCKER_TAG):amd64
|
|
|
|
cd tests && ./test-pre-scripts.sh $(DOCKER_TAG):amd64
|
2017-06-29 01:12:49 +00:00
|
|
|
|
2017-11-15 19:02:12 +00:00
|
|
|
.PHONY: test-arm
|
2017-06-29 01:12:49 +00:00
|
|
|
test-arm: build-arm
|
2020-02-11 21:28:19 +00:00
|
|
|
cd tests && ./test.sh $(DOCKER_TAG):arm
|
|
|
|
cd tests && ./test-pre-scripts.sh $(DOCKER_TAG):arm
|
2017-06-29 01:12:49 +00:00
|
|
|
|
2017-11-15 19:02:12 +00:00
|
|
|
.PHONY: test-all
|
2020-02-11 21:28:19 +00:00
|
|
|
test-all: test-amd64 test-arm
|
2017-07-17 02:37:03 +00:00
|
|
|
|
2020-02-11 21:28:19 +00:00
|
|
|
.PHONY: test-s3-amd64
|
|
|
|
test-s3-amd64: build-amd64
|
2020-02-13 01:43:36 +00:00
|
|
|
cd tests && ./test-compose.sh s3 $(DOCKER_TAG):amd64
|
2017-11-16 17:23:03 +00:00
|
|
|
|
|
|
|
.PHONY: test-s3-arm
|
2020-02-11 21:28:19 +00:00
|
|
|
test-s3-arm: build-arm
|
2020-02-13 01:43:36 +00:00
|
|
|
cd tests && ./test-compose.sh s3 $(DOCKER_TAG):arm
|
2017-11-16 17:23:03 +00:00
|
|
|
|
|
|
|
.PHONY: test-s3-all
|
2020-02-11 21:28:19 +00:00
|
|
|
test-s3-all: test-s3-amd64 test-s3-arm
|
2017-11-16 17:23:03 +00:00
|
|
|
|
2020-02-11 21:28:19 +00:00
|
|
|
.PHONY: shell-amd64
|
|
|
|
shell-amd64: build-amd64
|
2020-02-13 01:43:36 +00:00
|
|
|
docker run --rm -it $(DOCKER_TAG):amd64 bash
|
2017-07-17 02:37:03 +00:00
|
|
|
|
2017-11-15 19:02:12 +00:00
|
|
|
.PHONY: shell-arm
|
2017-07-17 02:37:03 +00:00
|
|
|
shell-arm: build-arm
|
2020-02-13 01:43:36 +00:00
|
|
|
docker run --rm -it $(DOCKER_TAG):arm bash
|
2017-07-17 02:37:03 +00:00
|
|
|
|
2017-11-15 19:02:12 +00:00
|
|
|
.PHONY: shell
|
2020-02-11 21:28:19 +00:00
|
|
|
shell: shell-amd64
|
2017-11-16 17:23:03 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
docker-compose -f docker-compose-test-s3.yml down -v
|