chore(ci): cleanup github actions (#218)

* chore(ci): cleanup github actions

Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

* chore(ci): use make target to setup kind

Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

---------

Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
This commit is contained in:
Luca Burgazzoli 2024-09-02 15:46:04 +02:00 committed by GitHub
parent d05069b2a7
commit 2a3f2d7a42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 36 additions and 37 deletions

View File

@ -9,8 +9,6 @@ jobs:
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: "Set up Go"
uses: actions/setup-go@v5
with:

View File

@ -55,10 +55,10 @@ jobs:
strategy:
matrix:
kubernetes-version:
- "1.27.13"
- "1.28.9"
- "1.29.4"
- "1.30.2"
- "1.27.16"
- "1.28.13"
- "1.29.8"
- "1.30.4"
steps:
- name: "Checkout"
uses: actions/checkout@v4
@ -67,14 +67,15 @@ jobs:
with:
go-version-file: 'go.mod'
check-latest: true
- name: 'SetUp KinD'
uses: container-tools/kind-action@v2.0.4
- name: 'SetUp Kubectl'
uses: azure/setup-kubectl@v4
with:
version: "v0.23.0"
kubectl_version: v${{ matrix.kubernetes-version }}
registry: false
node_image: kindest/node:v${{ matrix.kubernetes-version }}
config: test/e2e/kind.yaml
version: v${{ matrix.kubernetes-version }}
- name: 'SetUp KinD'
env:
KIND_IMAGE_VERSION: v${{ matrix.kubernetes-version }}
run: |
make test/e2e/kind
- name: 'SetUp Kind Ingress'
run: |
make deploy/e2e/ingress

View File

@ -35,10 +35,10 @@ jobs:
strategy:
matrix:
kubernetes-version:
- "1.27.13"
- "1.28.9"
- "1.29.4"
- "1.30.2"
- "1.27.16"
- "1.28.13"
- "1.29.8"
- "1.30.4"
steps:
- name: "Checkout"
uses: actions/checkout@v4
@ -47,14 +47,15 @@ jobs:
with:
go-version-file: 'go.mod'
check-latest: true
- name: 'SetUp KinD'
uses: container-tools/kind-action@v2.0.4
- name: 'SetUp Kubectl'
uses: azure/setup-kubectl@v4
with:
version: "v0.23.0"
kubectl_version: v${{ matrix.kubernetes-version }}
registry: false
node_image: kindest/node:v${{ matrix.kubernetes-version }}
config: test/e2e/kind.yaml
version: v${{ matrix.kubernetes-version }}
- name: 'SetUp KinD'
env:
KIND_IMAGE_VERSION: v${{ matrix.kubernetes-version }}
run: |
make test/e2e/kind
- name: 'SetUp Kind Ingress'
run: |
make deploy/e2e/ingress

View File

@ -42,16 +42,6 @@ jobs:
echo "CONTAINER_IMAGE_VERSION=${C_VERSION}" >> $GITHUB_ENV
echo "BUNDLE_VERSION=${C_VERSION}" >> $GITHUB_ENV
echo "CATALOG_VERSION=latest" >> $GITHUB_ENV
- name: 'Dump debug info'
run: |
make docker/image/name 2>&1 > /tmp/docker-image-name.txt
- name: 'Upload debug info'
uses: actions/upload-artifact@v4
with:
name: ocker-image-name.txt
path: /tmp/docker-image-name.txt
- name: "Build Dapr Kubernetes Operator Container image"
run: |
make docker/build

View File

@ -34,6 +34,7 @@ CODEGEN_VERSION ?= v0.30.3
KUSTOMIZE_VERSION ?= v5.4.2
CONTROLLER_TOOLS_VERSION ?= v0.16.0
KIND_VERSION ?= v0.23.0
KIND_IMAGE_VERSION ?= v1.30.4
LINTER_VERSION ?= v1.60.2
OPERATOR_SDK_VERSION ?= v1.36.1
OPM_VERSION ?= v1.45.0
@ -139,6 +140,14 @@ test/e2e/olm: ## Run e2e catalog tests.
test/e2e/app: ko ## Deploy test app.
KO_DOCKER_REPO=kind.local $(LOCALBIN)/ko build -B ./test/e2e/support/dapr-test-app
.PHONY: test/e2e/kind
test/e2e/kind: kind ## Deploy test app.
$(LOCALBIN)/kind create cluster \
--image=kindest/node:$(KIND_IMAGE_VERSION) \
--config=$(PROJECT_PATH)/test/e2e/kind.yaml \
--wait=60s
##@ Build
.PHONY: build
@ -203,8 +212,8 @@ docker/push: ## Push docker image with the manager.
$(CONTAINER_TOOL) push $(CONTAINER_IMAGE)
.PHONY: docker/push/kind
docker/push/kind: docker/build ## Load docker image in kind.
kind load docker-image $(CONTAINER_IMAGE)
docker/push/kind: kind docker/build ## Load docker image in kind.
$(LOCALBIN)/kind load docker-image $(CONTAINER_IMAGE)
.PHONY: docker/image/name
docker/image/name:
@ -232,7 +241,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
.PHONY: deploy/kind
deploy/kind: manifests kustomize kind ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=$(CONTAINER_IMAGE)
kind load docker-image $(CONTAINER_IMAGE)
$(LOCALBIN)/ load docker-image $(CONTAINER_IMAGE)
$(KUSTOMIZE) build config/deploy/standalone | kubectl apply -f -
.PHONY: deploy/e2e/controller