install Kind to GOENV/bin
This commit is contained in:
		
							parent
							
								
									82bf0d90ed
								
							
						
					
					
						commit
						b8e5567e91
					
				
							
								
								
									
										4
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										4
									
								
								Makefile
								
								
								
								
							|  | @ -34,7 +34,7 @@ ifdef CDP_PULL_REQUEST_NUMBER | ||||||
| 	CDP_TAG := -${CDP_BUILD_VERSION} | 	CDP_TAG := -${CDP_BUILD_VERSION} | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| 
 | KIND_PATH := $(GOPATH)/bin | ||||||
| PATH := $(GOPATH)/bin:$(PATH) | PATH := $(GOPATH)/bin:$(PATH) | ||||||
| SHELL := env PATH=$(PATH) $(SHELL) | SHELL := env PATH=$(PATH) $(SHELL) | ||||||
| 
 | 
 | ||||||
|  | @ -98,7 +98,7 @@ e2e-build: | ||||||
| e2e-tools: | e2e-tools: | ||||||
| 	wget https://github.com/kubernetes-sigs/kind/releases/download/0.2.1/kind-linux-amd64 | 	wget https://github.com/kubernetes-sigs/kind/releases/download/0.2.1/kind-linux-amd64 | ||||||
| 	chmod +x kind-linux-amd64 | 	chmod +x kind-linux-amd64 | ||||||
| 	mv kind-linux-amd64 /tmp/kind | 	mv kind-linux-amd64 $(KIND_PATH) | ||||||
| 
 | 
 | ||||||
| e2e-run: docker | e2e-run: docker | ||||||
| 	e2e/run.sh | 	e2e/run.sh | ||||||
|  |  | ||||||
|  | @ -6,16 +6,13 @@ set -o nounset | ||||||
| set -o pipefail | set -o pipefail | ||||||
| IFS=$'\n\t' | IFS=$'\n\t' | ||||||
| 
 | 
 | ||||||
| export PATH=$PATH:/tmp/kind |  | ||||||
| echo $PATH |  | ||||||
| ls -al /tmp/kind |  | ||||||
| 
 |  | ||||||
| readonly cluster_name="postgres-operator-e2e-tests" | readonly cluster_name="postgres-operator-e2e-tests" | ||||||
| readonly operator_image=$(docker images --filter=reference="registry.opensource.zalan.do/acid/postgres-operator" --format "{{.Repository}}:{{.Tag}}"  | head -1) | readonly operator_image=$(docker images --filter=reference="registry.opensource.zalan.do/acid/postgres-operator" --format "{{.Repository}}:{{.Tag}}"  | head -1) | ||||||
| readonly e2e_test_image=${cluster_name} | readonly e2e_test_image=${cluster_name} | ||||||
| readonly kind_api_server_port=6443 # well-known in the 'kind' codebase | readonly kind_api_server_port=6443 # well-known in the 'kind' codebase | ||||||
| readonly kubeconfig_path="./e2e/kind-config-${cluster_name}" | readonly kubeconfig_path="./e2e/kind-config-${cluster_name}" | ||||||
| 
 | 
 | ||||||
|  | alias kind="${GOPATH}/bin/kind-linux-amd64" | ||||||
| # avoid interference with previous test runs | # avoid interference with previous test runs | ||||||
| if [[ $(kind get clusters | grep "^${cluster_name}*") != "" ]] | if [[ $(kind get clusters | grep "^${cluster_name}*") != "" ]] | ||||||
| then | then | ||||||
|  | @ -36,4 +33,5 @@ sed -i "s/server.*$/server: https:\/\/$kind_api_server/g" ${kubeconfig_path} | ||||||
| docker run --rm --mount type=bind,source="$(realpath ${kubeconfig_path})",target=/root/.kube/config -e OPERATOR_IMAGE=${operator_image} ${e2e_test_image} | docker run --rm --mount type=bind,source="$(realpath ${kubeconfig_path})",target=/root/.kube/config -e OPERATOR_IMAGE=${operator_image} ${e2e_test_image} | ||||||
| 
 | 
 | ||||||
| kind delete cluster --name ${cluster_name} | kind delete cluster --name ${cluster_name} | ||||||
|  | unalias kind | ||||||
| rm -rf ${kubeconfig_path} | rm -rf ${kubeconfig_path} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue