mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
Makefiles: build the test docker img
this commit changes how the dockertest image is built. it moves the command into dockertest/Makefile. It also uses a cached file that -- if removed with make clean -- can signal whether the image should be rebuilt. (it may be ideal to have it either detect code has changed, or just rebuild every time. )
This commit is contained in:
parent
497297b243
commit
87c4fb2fea
1
Makefile
1
Makefile
@ -18,7 +18,6 @@ test: test_go test_sharness
|
||||
test_expensive: test_go_expensive test_sharness_expensive
|
||||
|
||||
test_docker:
|
||||
docker build -t zaqwsx_ipfs-test-img .
|
||||
cd dockertest/ && make
|
||||
|
||||
test_go:
|
||||
|
||||
@ -14,9 +14,6 @@ setup: docker_ipfs_image data/filetiny data/filerand
|
||||
save_logs:
|
||||
sh bin/save_logs.sh
|
||||
|
||||
docker_ipfs_image:
|
||||
docker images | grep $(IPFS_DOCKER_IMAGE)
|
||||
|
||||
data/filetiny: Makefile
|
||||
cp Makefile ./data/filetiny # simple
|
||||
|
||||
@ -26,6 +23,16 @@ data/filerand: bin/random
|
||||
bin/random:
|
||||
go build -o ./bin/random ../$(RANDOMSRC)
|
||||
|
||||
docker_ipfs_image: build/.built_img
|
||||
docker images | grep $(IPFS_DOCKER_IMAGE)
|
||||
|
||||
# this is here so that "make clean; make" rebuilds the docker img.
|
||||
# but otherwise will reuse whatever you last built.
|
||||
# TODO: make this detect whether code has been changed
|
||||
build/.built_img:
|
||||
cd .. && docker build -t $(IPFS_DOCKER_IMAGE) .
|
||||
touch build/.built_img
|
||||
|
||||
clean:
|
||||
sh bin/clean.sh
|
||||
fig stop
|
||||
@ -34,3 +41,4 @@ clean:
|
||||
rm -f data/filetiny
|
||||
rm -f data/filerand
|
||||
rm -rf build/*
|
||||
rm -rf build/.built_img
|
||||
|
||||
3
dockertest/build/.gitignore
vendored
3
dockertest/build/.gitignore
vendored
@ -1,2 +1 @@
|
||||
*.log
|
||||
go-random
|
||||
.built_img
|
||||
|
||||
Loading…
Reference in New Issue
Block a user