@@ -24,40 +24,45 @@ REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424ENABLE_BPMETADATA := 1
2525export ENABLE_BPMETADATA
2626
27- # This is the fix: A common set of flags for docker commands that need GCP authentication.
28- # It removes the failing SERVICE_ACCOUNT_JSON and adds a volume mount for gcloud config.
29- AUTH_DOCKER_FLAGS = --rm -it \
30- -e TF_VAR_org_id \
31- -e TF_VAR_folder_id \
32- -e TF_VAR_billing_account \
33- -v "$(CURDIR ) ":/workspace \
34- -v ~/.config/gcloud:/root/.config/gcloud
35-
3627# Enter docker container for local development
3728.PHONY : docker_run
3829docker_run :
39- docker run $(AUTH_DOCKER_FLAGS ) \
30+ docker run --rm -it \
31+ -e SERVICE_ACCOUNT_JSON \
32+ -v " $( CURDIR) " :/workspace \
4033 $(REGISTRY_URL ) /${DOCKER_IMAGE_DEVELOPER_TOOLS} :${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
4134 /bin/bash
4235
4336# Execute prepare tests within the docker container
4437.PHONY : docker_test_prepare
4538docker_test_prepare :
46- docker run $(AUTH_DOCKER_FLAGS ) \
39+ docker run --rm -it \
40+ -e SERVICE_ACCOUNT_JSON \
41+ -e TF_VAR_org_id \
42+ -e TF_VAR_folder_id \
43+ -e TF_VAR_billing_account \
44+ -v " $( CURDIR) " :/workspace \
4745 $(REGISTRY_URL ) /${DOCKER_IMAGE_DEVELOPER_TOOLS} :${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
4846 /usr/local/bin/execute_with_credentials.sh prepare_environment
4947
5048# Clean up test environment within the docker container
5149.PHONY : docker_test_cleanup
5250docker_test_cleanup :
53- docker run $(AUTH_DOCKER_FLAGS ) \
51+ docker run --rm -it \
52+ -e SERVICE_ACCOUNT_JSON \
53+ -e TF_VAR_org_id \
54+ -e TF_VAR_folder_id \
55+ -e TF_VAR_billing_account \
56+ -v " $( CURDIR) " :/workspace \
5457 $(REGISTRY_URL ) /${DOCKER_IMAGE_DEVELOPER_TOOLS} :${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
5558 /usr/local/bin/execute_with_credentials.sh cleanup_environment
5659
5760# Execute integration tests within the docker container
5861.PHONY : docker_test_integration
5962docker_test_integration :
60- docker run $(AUTH_DOCKER_FLAGS ) \
63+ docker run --rm -it \
64+ -e SERVICE_ACCOUNT_JSON \
65+ -v " $( CURDIR) " :/workspace \
6166 $(REGISTRY_URL ) /${DOCKER_IMAGE_DEVELOPER_TOOLS} :${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
6267 /usr/local/bin/test_integration.sh
6368
0 commit comments