Skip to content

Instantly share code, notes, and snippets.

@mleuthold
Created April 4, 2019 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mleuthold/374a06217ff4382d7b67a21d66d03a5d to your computer and use it in GitHub Desktop.
Save mleuthold/374a06217ff4382d7b67a21d66d03a5d to your computer and use it in GitHub Desktop.
How to write Make targets for parallel execution with partial ordering
# run deploy phases in sequence
deploy:
$(MAKE) deploy.infrastructure
$(MAKE) deploy.kafka-topics
$(MAKE) deploy.pipeline
# deploy infrastructure in parallel
deploy.infrastructure: \
deploy.kafka-cluster \
deploy.kafka-client
# include target from different Makefile
include mk/kafka-topics.mk
# deploy pipeline in parallel
deploy.pipeline: \
deploy.collector \
deploy.enricher
# on CLI
#time make deploy --jobs --no-keep-going --output-sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment