diff --git a/.ci-operator.yaml b/.ci-operator.yaml deleted file mode 100644 index c3247aa..0000000 --- a/.ci-operator.yaml +++ /dev/null @@ -1,4 +0,0 @@ -build_root_image: - namespace: ci - name: kcp-dev-build-root - tag: "1.18" \ No newline at end of file diff --git a/.prow.yaml b/.prow.yaml new file mode 100644 index 0000000..8901be0 --- /dev/null +++ b/.prow.yaml @@ -0,0 +1,26 @@ +presubmits: + - name: pull-controller-runtime-example-e2e + always_run: true + decorate: true + clone_uri: "ssh://git@github.com/kcp-dev/controller-runtime-example.git" + labels: + preset-goproxy: "true" + spec: + containers: + - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + command: + - make + - test-e2e + + - name: pull-controller-runtime-example-unit + always_run: true + decorate: true + clone_uri: "ssh://git@github.com/kcp-dev/controller-runtime-example.git" + labels: + preset-goproxy: "true" + spec: + containers: + - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + command: + - make + - test diff --git a/Makefile b/Makefile index 5a36b17..295d9df 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,7 @@ KUSTOMIZE_VERSION ?= v3.8.7 CONTROLLER_TOOLS_VERSION ?= v0.8.0 KCP_VERSION ?= 0.11.0-alpha.0 YQ_VERSION ?= v4.27.2 +KIND_VERSION ?= 0.19.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" $(KUSTOMIZE): ## Download kustomize locally if necessary. @@ -146,6 +147,10 @@ kind-image: docker-build ## Load the controller-manager image into the kind clus kind load docker-image $(REGISTRY)/$(IMG) --name controller-runtime-example $(ARTIFACT_DIR)/kind.kubeconfig: $(ARTIFACT_DIR) ## Run a kind cluster and generate a $KUBECONFIG for it. + if ! type "kind" > /dev/null; then \ + wget -q -O /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 && \ + chmod +x /usr/local/bin/kind; \ + fi @if ! kind get clusters --quiet | grep --quiet controller-runtime-example; then kind create cluster --name controller-runtime-example --image kindest/node:v1.24.2; fi kind get kubeconfig --name controller-runtime-example > $(ARTIFACT_DIR)/kind.kubeconfig