Skip to content

Commit 7c0b818

Browse files
committed
[NRL-774] WIP add some debug to check makefile env
1 parent 1f89762 commit 7c0b818

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

Makefile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ APP_ALIAS ?= default
1616
HOST ?= $(TF_WORKSPACE_NAME).api.record-locator.$(ENV).national.nhs.uk
1717
ENV_TYPE ?= $(ENV)
1818

19+
DEBUG_PROP_ASDF_ENV := $(shell env | grep ASDF)
20+
DEBUG_PROP_BUILD_PATH := $(shell env | grep PATH)
21+
1922
export PATH := $(PATH):$(PWD)/.venv/bin
2023
export USE_SHARED_RESOURCES := $(shell poetry run python scripts/are_resources_shared_for_stack.py $(TF_WORKSPACE_NAME))
2124

@@ -43,10 +46,26 @@ check: ## Check the build environment is setup correctly
4346
@./scripts/check-build-environment.sh
4447

4548
check-warn:
49+
@echo "$(shell echo "ASDF ENV: $(DEBUG_PROP_ASDF_ENV)")"
50+
@echo "$(shell echo "PATH: $(DEBUG_PROP_BUILD_PATH)")"
51+
echo "$(shell which asdf || true)"
52+
echo "$(shell which terraform || true)"
53+
echo "$(shell asdf which terraform || true)"
54+
echo "$(shell asdf list terraform || true)"
55+
echo "$(shell asdf current terraform || true)"
56+
echo "$(shell asdf reshim terraform 1.9.8)"
57+
echo "$(shell cat ~/.asdf/shims/terraform)"
58+
echo "$(shell asdf shim-versions terraform)"
59+
echo "$(shell cat ~/.bashrc)"
60+
echo "$(shell cat ~/.bash_profile)"
61+
echo "$(shell terraform -version || true)"
62+
echo "$(shell asdf exec terraform -version || true)"
63+
ls -ltr ~/.asdf/shims
64+
ls -ltr ~/.asdf/installs/terraform
4665
@SHOULD_WARN_ONLY=true ./scripts/check-build-environment.sh
4766

4867
check-deploy: ## check the deploy environment is setup correctly
49-
@./scripts/check-deploy-environment.sh
68+
@./scripts/lint-deploy-environment.sh
5069

5170
check-deploy-warn:
5271
@SHOULD_WARN_ONLY=true ./scripts/check-deploy-environment.sh
@@ -173,6 +192,7 @@ test-performance-cleanup:
173192
PYTHONPATH=. poetry run python tests/performance/environment.py cleanup $(TF_WORKSPACE_NAME)
174193

175194
lint: check-warn ## Lint the project
195+
176196
SKIP="no-commit-to-branch" pre-commit run --all-files
177197

178198
clean: ## Remove all generated and temporary files

0 commit comments

Comments
 (0)