Skip to content

Commit be11bdc

Browse files
authored
chore(make): add docker-skip convenience target to Makefile.terraform (#1519)
* chore(make): add docker skip convenience target to Makefile.terraform A stashed WIP had docker-build/docker-skip/frontend-skip targets wrapping skip_docker_build/skip_docker_push/enable_frontend_build terraform vars. Of those, only the "skip the whole docker build" case still maps to a real variable (enable_docker_build, which replaced skip_docker_build). skip_docker_push and enable_frontend_build no longer exist anywhere in terraform/environments/*/variables.tf, so docker-build (build without push) and frontend-skip have no current equivalent and are documented as such instead of reintroduced. * chore(make): list docker-skip in make help Addresses the CodeRabbit finding on Makefile.terraform:139. The help output is hard-coded at lines 13-39 and does not consume the `##` target descriptions, so docker-skip was undiscoverable through `make help` despite carrying one. That matters more than a normal doc gap here: the target exists purely as a convenience wrapper, so a convenience nobody can find is not one. Verified `make -f Makefile.terraform help` now lists it and `make -n -f Makefile.terraform docker-skip` still expands unchanged.
1 parent 101f099 commit be11bdc

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

‎Makefile.terraform‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
.PHONY: help deploy plan destroy profile-list profile-show clean clean-locks \
55
output aws-dev aws-prod azure-dev gcp-dev quick-plan aws-dev-plan quick-deploy \
6-
validate fmt state-list state-show frontend-only
6+
validate fmt state-list state-show docker-skip frontend-only
77

88
# Default profile settings
99
PROVIDER ?= aws
@@ -27,6 +27,9 @@ help: ## Show this help message
2727
@echo " make profile-list # List all available profiles"
2828
@echo " make profile-show # Show current profile contents"
2929
@echo ""
30+
@echo "Docker Operations:"
31+
@echo " make docker-skip # Deploy without building the Docker image"
32+
@echo ""
3033
@echo "Cleanup:"
3134
@echo " make destroy # Destroy infrastructure (asks for confirmation)"
3235
@echo " make clean # Clean Terraform cache files"
@@ -119,6 +122,27 @@ state-list: ## List resources in Terraform state
119122
state-show: ## Show detailed state for a resource
120123
@cd terraform/environments/$(PROVIDER)/$(PROFILE) && terraform state show $(RESOURCE)
121124

125+
# Docker operations
126+
#
127+
# Note: an earlier draft of this file also had a "docker-build" target
128+
# (build the image but skip the ECR push, via a "skip_docker_push" var)
129+
# and a "frontend-skip" target (skip frontend build, via an
130+
# "enable_frontend_build" var). Neither variable exists anywhere in
131+
# terraform/environments/*/build.tf or variables.tf any more:
132+
# - the build module has no build-without-push option, so "docker-build"
133+
# has no current equivalent;
134+
# - frontend assets are now bundled into the Docker/app build rather than
135+
# built as a separate Terraform-controlled step, and the closest
136+
# surviving flag (enable_cdn) only toggles the CloudFront distribution
137+
# in front of the frontend (defaulting to false already), not whether
138+
# the frontend gets built - so a "frontend-skip" wrapper would be
139+
# redundant with plain `make deploy`.
140+
# Only the "skip the whole Docker build" case still maps to a real
141+
# variable (enable_docker_build, replacing the old skip_docker_build).
142+
docker-skip: ## Deploy without building the Docker image (uses pre-built image_uri)
143+
@echo "⏭️ Deploying without Docker build..."
144+
@./scripts/tf-deploy.sh $(PROVIDER) $(PROFILE) apply -var="enable_docker_build=false"
145+
122146
# Frontend operations
123147
frontend-only: ## Deploy frontend only
124148
@echo "🎨 Deploying frontend..."

0 commit comments

Comments
 (0)