File tree Expand file tree Collapse file tree 7 files changed +49
-7
lines changed
cronjob-tutorial/testdata/project
getting-started/testdata/project
multiversion-tutorial/testdata/project
pkg/plugins/golang/v4/scaffolds/internal/templates Expand file tree Collapse file tree 7 files changed +49
-7
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,13 @@ setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist
77
77
echo " Kind is not installed. Please install Kind manually." ; \
78
78
exit 1; \
79
79
}
80
- $(KIND ) create cluster --name $(KIND_CLUSTER )
80
+ @case " $$ ($( KIND) get clusters)" in \
81
+ * " $( KIND_CLUSTER) " * ) \
82
+ echo " Kind cluster '$( KIND_CLUSTER) ' already exists. Skipping creation." ;; \
83
+ * ) \
84
+ echo " Creating Kind cluster '$( KIND_CLUSTER) '..." ; \
85
+ $(KIND ) create cluster --name $(KIND_CLUSTER ) ;; \
86
+ esac
81
87
82
88
.PHONY : test-e2e
83
89
test-e2e : setup-test-e2e manifests generate fmt vet # # Run the e2e tests. Expected an isolated environment using Kind.
Original file line number Diff line number Diff line change @@ -73,7 +73,13 @@ setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist
73
73
echo " Kind is not installed. Please install Kind manually." ; \
74
74
exit 1; \
75
75
}
76
- $(KIND ) create cluster --name $(KIND_CLUSTER )
76
+ @case " $$ ($( KIND) get clusters)" in \
77
+ * " $( KIND_CLUSTER) " * ) \
78
+ echo " Kind cluster '$( KIND_CLUSTER) ' already exists. Skipping creation." ;; \
79
+ * ) \
80
+ echo " Creating Kind cluster '$( KIND_CLUSTER) '..." ; \
81
+ $(KIND ) create cluster --name $(KIND_CLUSTER ) ;; \
82
+ esac
77
83
78
84
.PHONY : test-e2e
79
85
test-e2e : setup-test-e2e manifests generate fmt vet # # Run the e2e tests. Expected an isolated environment using Kind.
Original file line number Diff line number Diff line change @@ -77,7 +77,13 @@ setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist
77
77
echo " Kind is not installed. Please install Kind manually." ; \
78
78
exit 1; \
79
79
}
80
- $(KIND ) create cluster --name $(KIND_CLUSTER )
80
+ @case " $$ ($( KIND) get clusters)" in \
81
+ * " $( KIND_CLUSTER) " * ) \
82
+ echo " Kind cluster '$( KIND_CLUSTER) ' already exists. Skipping creation." ;; \
83
+ * ) \
84
+ echo " Creating Kind cluster '$( KIND_CLUSTER) '..." ; \
85
+ $(KIND ) create cluster --name $(KIND_CLUSTER ) ;; \
86
+ esac
81
87
82
88
.PHONY : test-e2e
83
89
test-e2e : setup-test-e2e manifests generate fmt vet # # Run the e2e tests. Expected an isolated environment using Kind.
Original file line number Diff line number Diff line change @@ -152,7 +152,13 @@ setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist
152
152
echo "Kind is not installed. Please install Kind manually."; \
153
153
exit 1; \
154
154
}
155
- $(KIND) create cluster --name $(KIND_CLUSTER)
155
+ @case "$$($(KIND) get clusters)" in \
156
+ *"$(KIND_CLUSTER)"*) \
157
+ echo "Kind cluster '$(KIND_CLUSTER)' already exists. Skipping creation." ;; \
158
+ *) \
159
+ echo "Creating Kind cluster '$(KIND_CLUSTER)'..."; \
160
+ $(KIND) create cluster --name $(KIND_CLUSTER) ;; \
161
+ esac
156
162
157
163
.PHONY: test-e2e
158
164
test-e2e: setup-test-e2e manifests generate fmt vet ## Run the e2e tests. Expected an isolated environment using Kind.
Original file line number Diff line number Diff line change @@ -73,7 +73,13 @@ setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist
73
73
echo " Kind is not installed. Please install Kind manually." ; \
74
74
exit 1; \
75
75
}
76
- $(KIND ) create cluster --name $(KIND_CLUSTER )
76
+ @case " $$ ($( KIND) get clusters)" in \
77
+ * " $( KIND_CLUSTER) " * ) \
78
+ echo " Kind cluster '$( KIND_CLUSTER) ' already exists. Skipping creation." ;; \
79
+ * ) \
80
+ echo " Creating Kind cluster '$( KIND_CLUSTER) '..." ; \
81
+ $(KIND ) create cluster --name $(KIND_CLUSTER ) ;; \
82
+ esac
77
83
78
84
.PHONY : test-e2e
79
85
test-e2e : setup-test-e2e manifests generate fmt vet # # Run the e2e tests. Expected an isolated environment using Kind.
Original file line number Diff line number Diff line change @@ -73,7 +73,13 @@ setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist
73
73
echo " Kind is not installed. Please install Kind manually." ; \
74
74
exit 1; \
75
75
}
76
- $(KIND ) create cluster --name $(KIND_CLUSTER )
76
+ @case " $$ ($( KIND) get clusters)" in \
77
+ * " $( KIND_CLUSTER) " * ) \
78
+ echo " Kind cluster '$( KIND_CLUSTER) ' already exists. Skipping creation." ;; \
79
+ * ) \
80
+ echo " Creating Kind cluster '$( KIND_CLUSTER) '..." ; \
81
+ $(KIND ) create cluster --name $(KIND_CLUSTER ) ;; \
82
+ esac
77
83
78
84
.PHONY : test-e2e
79
85
test-e2e : setup-test-e2e manifests generate fmt vet # # Run the e2e tests. Expected an isolated environment using Kind.
Original file line number Diff line number Diff line change @@ -73,7 +73,13 @@ setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist
73
73
echo " Kind is not installed. Please install Kind manually." ; \
74
74
exit 1; \
75
75
}
76
- $(KIND ) create cluster --name $(KIND_CLUSTER )
76
+ @case " $$ ($( KIND) get clusters)" in \
77
+ * " $( KIND_CLUSTER) " * ) \
78
+ echo " Kind cluster '$( KIND_CLUSTER) ' already exists. Skipping creation." ;; \
79
+ * ) \
80
+ echo " Creating Kind cluster '$( KIND_CLUSTER) '..." ; \
81
+ $(KIND ) create cluster --name $(KIND_CLUSTER ) ;; \
82
+ esac
77
83
78
84
.PHONY : test-e2e
79
85
test-e2e : setup-test-e2e manifests generate fmt vet # # Run the e2e tests. Expected an isolated environment using Kind.
You can’t perform that action at this time.
0 commit comments