Skip to content

Commit

Permalink
Merge pull request #686 from pachyderm/smarter_compile
Browse files Browse the repository at this point in the history
Makes building of containers happen in parallel.
  • Loading branch information
jdoliner committed Jul 27, 2016
2 parents 2b30d91 + 82ae664 commit 9e842bd
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ifdef VENDOR_ALL
VENDOR_IGNORE_DIRS =
endif

COMPILE_RUN_ARGS = -v /var/run/docker.sock:/var/run/docker.sock --privileged=true
COMPILE_RUN_ARGS = -d -v /var/run/docker.sock:/var/run/docker.sock --privileged=true
CLUSTER_NAME = pachyderm
MANIFEST = etc/kube/pachyderm-versioned.json
DEV_MANIFEST = etc/kube/pachyderm.json
Expand Down Expand Up @@ -96,20 +96,34 @@ release-pachctl:
docker-build-compile:
docker build -t pachyderm_compile .

docker-build-job-shim: docker-build-compile
docker run $(COMPILE_RUN_ARGS) pachyderm_compile sh etc/compile/compile.sh job-shim "$(LD_FLAGS)"
docker-clean-job-shim:
docker stop job_shim_compile || true
docker rm job_shim_compile || true

docker-build-pachd: docker-build-compile
docker run $(COMPILE_RUN_ARGS) pachyderm_compile sh etc/compile/compile.sh pachd "$(LD_FLAGS)"
docker-build-job-shim: docker-clean-job-shim docker-build-compile
docker run --name job_shim_compile $(COMPILE_RUN_ARGS) pachyderm_compile sh etc/compile/compile.sh job-shim "$(LD_FLAGS)"

docker-build: docker-build-job-shim docker-build-pachd docker-build-fruitstand
docker-wait-job-shim:
docker wait job_shim_compile

docker-build-proto:
docker build -t pachyderm_proto etc/proto
docker-clean-pachd:
docker stop pachd_compile || true
docker rm pachd_compile || true

docker-build-pachd: docker-clean-pachd docker-build-compile
docker run --name pachd_compile $(COMPILE_RUN_ARGS) pachyderm_compile sh etc/compile/compile.sh pachd "$(LD_FLAGS)"

docker-wait-pachd:
docker wait pachd_compile

docker-build-fruitstand:
docker build -t fruit_stand examples/fruit_stand

docker-build: docker-build-job-shim docker-build-pachd docker-build-fruitstand docker-wait-job-shim docker-wait-pachd

docker-build-proto:
docker build -d -t pachyderm_proto etc/proto

docker-push-job-shim: docker-build-job-shim
docker push pachyderm/job-shim

Expand Down

0 comments on commit 9e842bd

Please sign in to comment.