Repository: chanzuckerberg/fogg
Pull request #391 (2020-01-02 18:28:23)

output component name & suppress tfenv command
Two small changes to clean up the output when running make targets.

1. When commands across a bunch of components at once, it helps to print
   out the component name before we run each one.
2. suppress the command output for the `tfenv install`

### Test Plan
* unit tests

### References



codecov[bot]: # [Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/391?src=pr&el=h1) Report
> Merging [#391](https://codecov.io/gh/chanzuckerberg/fogg/pull/391?src=pr&el=desc) into [master](https://codecov.io/gh/chanzuckerberg/fogg/commit/b68248a3179b0f0bbd2f386c4af18746995bef4c?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/chanzuckerberg/fogg/pull/391/graphs/tree.svg?width=650&token=57DhtZ7g2A&height=150&src=pr)](https://codecov.io/gh/chanzuckerberg/fogg/pull/391?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #391   +/-   ##
=======================================
  Coverage   79.04%   79.04%           
=======================================
  Files          25       25           
  Lines        2009     2009           
=======================================
  Hits         1588     1588           
  Misses        278      278           
  Partials      143      143
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/391?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/391?src=pr&el=footer). Last update [b68248a...f62684b](https://codecov.io/gh/chanzuckerberg/fogg/pull/391?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/templates/env/Makefile.tmpl b/templates/env/Makefile.tmpl
index 1d5bb1c9..b77a90d1 100644
--- a/templates/env/Makefile.tmpl
+++ b/templates/env/Makefile.tmpl
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean
diff --git a/templates/repo/scripts/common.mk b/templates/repo/scripts/common.mk
index 688c2e83..e782adf8 100644
--- a/templates/repo/scripts/common.mk
+++ b/templates/repo/scripts/common.mk
@@ -28,5 +28,5 @@ tfenv: ## install the tfenv tool
 .PHONY: tfenv
 
 terraform: tfenv ## ensure that the proper version of terraform is installed
-	${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
+	@${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
 .PHONY: terraform


Test patch:
diff --git a/testdata/bless_provider/scripts/common.mk b/testdata/bless_provider/scripts/common.mk
index 688c2e83..e782adf8 100644
--- a/testdata/bless_provider/scripts/common.mk
+++ b/testdata/bless_provider/scripts/common.mk
@@ -28,5 +28,5 @@ tfenv: ## install the tfenv tool
 .PHONY: tfenv
 
 terraform: tfenv ## ensure that the proper version of terraform is installed
-	${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
+	@${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
 .PHONY: terraform
diff --git a/testdata/bless_provider/terraform/envs/bar/Makefile b/testdata/bless_provider/terraform/envs/bar/Makefile
index 5dadc9e0..e5f90fa2 100644
--- a/testdata/bless_provider/terraform/envs/bar/Makefile
+++ b/testdata/bless_provider/terraform/envs/bar/Makefile
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean
diff --git a/testdata/github_provider/scripts/common.mk b/testdata/github_provider/scripts/common.mk
index 688c2e83..e782adf8 100644
--- a/testdata/github_provider/scripts/common.mk
+++ b/testdata/github_provider/scripts/common.mk
@@ -28,5 +28,5 @@ tfenv: ## install the tfenv tool
 .PHONY: tfenv
 
 terraform: tfenv ## ensure that the proper version of terraform is installed
-	${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
+	@${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
 .PHONY: terraform
diff --git a/testdata/github_provider/terraform/envs/bar/Makefile b/testdata/github_provider/terraform/envs/bar/Makefile
index 5dadc9e0..e5f90fa2 100644
--- a/testdata/github_provider/terraform/envs/bar/Makefile
+++ b/testdata/github_provider/terraform/envs/bar/Makefile
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean
diff --git a/testdata/okta_provider/scripts/common.mk b/testdata/okta_provider/scripts/common.mk
index 688c2e83..e782adf8 100644
--- a/testdata/okta_provider/scripts/common.mk
+++ b/testdata/okta_provider/scripts/common.mk
@@ -28,5 +28,5 @@ tfenv: ## install the tfenv tool
 .PHONY: tfenv
 
 terraform: tfenv ## ensure that the proper version of terraform is installed
-	${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
+	@${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
 .PHONY: terraform
diff --git a/testdata/okta_provider/terraform/envs/bar/Makefile b/testdata/okta_provider/terraform/envs/bar/Makefile
index 5dadc9e0..e5f90fa2 100644
--- a/testdata/okta_provider/terraform/envs/bar/Makefile
+++ b/testdata/okta_provider/terraform/envs/bar/Makefile
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean
diff --git a/testdata/snowflake_provider/scripts/common.mk b/testdata/snowflake_provider/scripts/common.mk
index 688c2e83..e782adf8 100644
--- a/testdata/snowflake_provider/scripts/common.mk
+++ b/testdata/snowflake_provider/scripts/common.mk
@@ -28,5 +28,5 @@ tfenv: ## install the tfenv tool
 .PHONY: tfenv
 
 terraform: tfenv ## ensure that the proper version of terraform is installed
-	${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
+	@${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
 .PHONY: terraform
diff --git a/testdata/snowflake_provider/terraform/envs/bar/Makefile b/testdata/snowflake_provider/terraform/envs/bar/Makefile
index 5dadc9e0..e5f90fa2 100644
--- a/testdata/snowflake_provider/terraform/envs/bar/Makefile
+++ b/testdata/snowflake_provider/terraform/envs/bar/Makefile
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean
diff --git a/testdata/v1_full/scripts/common.mk b/testdata/v1_full/scripts/common.mk
index 688c2e83..e782adf8 100644
--- a/testdata/v1_full/scripts/common.mk
+++ b/testdata/v1_full/scripts/common.mk
@@ -28,5 +28,5 @@ tfenv: ## install the tfenv tool
 .PHONY: tfenv
 
 terraform: tfenv ## ensure that the proper version of terraform is installed
-	${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
+	@${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
 .PHONY: terraform
diff --git a/testdata/v1_full/terraform/envs/stage/Makefile b/testdata/v1_full/terraform/envs/stage/Makefile
index 7f3509cf..0e4be741 100644
--- a/testdata/v1_full/terraform/envs/stage/Makefile
+++ b/testdata/v1_full/terraform/envs/stage/Makefile
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean
diff --git a/testdata/v2_full/scripts/common.mk b/testdata/v2_full/scripts/common.mk
index 688c2e83..e782adf8 100644
--- a/testdata/v2_full/scripts/common.mk
+++ b/testdata/v2_full/scripts/common.mk
@@ -28,5 +28,5 @@ tfenv: ## install the tfenv tool
 .PHONY: tfenv
 
 terraform: tfenv ## ensure that the proper version of terraform is installed
-	${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
+	@${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
 .PHONY: terraform
diff --git a/testdata/v2_full/terraform/envs/prod/Makefile b/testdata/v2_full/terraform/envs/prod/Makefile
index 77ba8162..341a07dc 100644
--- a/testdata/v2_full/terraform/envs/prod/Makefile
+++ b/testdata/v2_full/terraform/envs/prod/Makefile
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean
diff --git a/testdata/v2_full/terraform/envs/staging/Makefile b/testdata/v2_full/terraform/envs/staging/Makefile
index 9ae8d40a..219711db 100644
--- a/testdata/v2_full/terraform/envs/staging/Makefile
+++ b/testdata/v2_full/terraform/envs/staging/Makefile
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean
diff --git a/testdata/v2_minimal_valid/scripts/common.mk b/testdata/v2_minimal_valid/scripts/common.mk
index 688c2e83..e782adf8 100644
--- a/testdata/v2_minimal_valid/scripts/common.mk
+++ b/testdata/v2_minimal_valid/scripts/common.mk
@@ -28,5 +28,5 @@ tfenv: ## install the tfenv tool
 .PHONY: tfenv
 
 terraform: tfenv ## ensure that the proper version of terraform is installed
-	${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
+	@${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
 .PHONY: terraform
diff --git a/testdata/v2_no_aws_provider/scripts/common.mk b/testdata/v2_no_aws_provider/scripts/common.mk
index 688c2e83..e782adf8 100644
--- a/testdata/v2_no_aws_provider/scripts/common.mk
+++ b/testdata/v2_no_aws_provider/scripts/common.mk
@@ -28,5 +28,5 @@ tfenv: ## install the tfenv tool
 .PHONY: tfenv
 
 terraform: tfenv ## ensure that the proper version of terraform is installed
-	${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
+	@${TFENV_DIR}/bin/tfenv install $(TERRAFORM_VERSION)
 .PHONY: terraform
diff --git a/testdata/v2_no_aws_provider/terraform/envs/prod/Makefile b/testdata/v2_no_aws_provider/terraform/envs/prod/Makefile
index 77ba8162..341a07dc 100644
--- a/testdata/v2_no_aws_provider/terraform/envs/prod/Makefile
+++ b/testdata/v2_no_aws_provider/terraform/envs/prod/Makefile
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean
diff --git a/testdata/v2_no_aws_provider/terraform/envs/staging/Makefile b/testdata/v2_no_aws_provider/terraform/envs/staging/Makefile
index 9c080ac6..9fb1403e 100644
--- a/testdata/v2_no_aws_provider/terraform/envs/staging/Makefile
+++ b/testdata/v2_no_aws_provider/terraform/envs/staging/Makefile
@@ -8,30 +8,35 @@ all:
 
 lint: ## lint all components in the env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c lint || exit $$? ; \
 	done
 .PHONY: lint
 
 fmt: ## format terraform code in all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c fmt || exit $$? ; \
 	done
 .PHONY: fmt
 
 check-plan: ## check all plans in this environment
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c check-plan || exit $$? ; \
 	done
 .PHONY: check-plan
 
 docs: ## generate docs for all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c docs || exit $$? ; \
 	done
 .PHONY: docs
 
 clean: ## clean all components in this env
 	@for c in $(COMPONENTS); do \
+		echo $$c; \
 		$(MAKE) -C $$c clean || exit $$? ; \
 	done
 .PHONY: clean