@@ -21,7 +21,7 @@ SHELL := /usr/bin/env bash
2121# Docker build config variables
2222CREDENTIALS_PATH ?= /cft/workdir/credentials.json
2323DOCKER_ORG := gcr.io/cloud-foundation-cicd
24- DOCKER_TAG_BASE_KITCHEN_TERRAFORM ?= 1.0.1
24+ DOCKER_TAG_BASE_KITCHEN_TERRAFORM ?= 2.3.0
2525DOCKER_REPO_BASE_KITCHEN_TERRAFORM := ${DOCKER_ORG}/cft/kitchen-terraform:${DOCKER_TAG_BASE_KITCHEN_TERRAFORM}
2626
2727# All is the first target in the file so it will get picked up when you just run 'make' on its own
@@ -30,7 +30,7 @@ all: check generate_docs
3030
3131# Run all available linters
3232.PHONY : check
33- check : check_shell check_python check_golang check_terraform check_docker check_base_files test_check_headers check_headers check_trailing_whitespace
33+ check : check_shell check_python check_golang check_terraform check_base_files test_check_headers check_headers check_trailing_whitespace
3434
3535# The .PHONY directive tells make that this isn't a real target and so
3636# the presence of a file named 'check_shell' won't cause this target to stop
@@ -95,7 +95,7 @@ docker_run:
9595 -e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
9696 -v $(CURDIR ) :/cft/workdir \
9797 ${DOCKER_REPO_BASE_KITCHEN_TERRAFORM} \
98- /bin/bash -c " source test/ci_integration.sh && setup_environment && exec /bin/bash"
98+ /bin/bash -c " cd /cft/workdir && source test/ci_integration.sh && setup_environment && exec /bin/bash"
9999
100100.PHONY : docker_create
101101docker_create :
@@ -105,7 +105,7 @@ docker_create:
105105 -e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
106106 -v $(CURDIR ) :/cft/workdir \
107107 ${DOCKER_REPO_BASE_KITCHEN_TERRAFORM} \
108- /bin/bash -c " source test/ci_integration.sh && setup_environment && kitchen create"
108+ /bin/bash -c " cd /cft/workdir && source test/ci_integration.sh && setup_environment && kitchen create"
109109
110110.PHONY : docker_converge
111111docker_converge :
@@ -115,7 +115,7 @@ docker_converge:
115115 -e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
116116 -v $(CURDIR ) :/cft/workdir \
117117 ${DOCKER_REPO_BASE_KITCHEN_TERRAFORM} \
118- /bin/bash -c " source test/ci_integration.sh && setup_environment && kitchen converge"
118+ /bin/bash -c " cd /cft/workdir && source test/ci_integration.sh && setup_environment && kitchen converge"
119119
120120.PHONY : docker_verify
121121docker_verify :
@@ -125,7 +125,7 @@ docker_verify:
125125 -e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
126126 -v $(CURDIR ) :/cft/workdir \
127127 ${DOCKER_REPO_BASE_KITCHEN_TERRAFORM} \
128- /bin/bash -c " source test/ci_integration.sh && setup_environment && kitchen verify"
128+ /bin/bash -c " cd /cft/workdir && source test/ci_integration.sh && setup_environment && kitchen verify"
129129
130130.PHONY : docker_destroy
131131docker_destroy :
@@ -135,7 +135,7 @@ docker_destroy:
135135 -e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
136136 -v $(CURDIR ) :/cft/workdir \
137137 ${DOCKER_REPO_BASE_KITCHEN_TERRAFORM} \
138- /bin/bash -c " source test/ci_integration.sh && setup_environment && kitchen destroy"
138+ /bin/bash -c " cd /cft/workdir && source test/ci_integration.sh && setup_environment && kitchen destroy"
139139
140140.PHONY : test_integration_docker
141141test_integration_docker :
@@ -145,4 +145,4 @@ test_integration_docker:
145145 -e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
146146 -v $(CURDIR ) :/cft/workdir \
147147 ${DOCKER_REPO_BASE_KITCHEN_TERRAFORM} \
148- make test_integration
148+ /bin/bash -c " cd /cft/workdir && source test/ci_integration.sh && setup_environment && make test_integration"
0 commit comments