Skip to content

Commit 0afc933

Browse files
authored
release 0.6.0 (#7)
* add rollout 0.6.0 api --------- Signed-off-by: AiRanthem <[email protected]>
1 parent e53ad2c commit 0afc933

33 files changed

+1350
-1744
lines changed

.github/workflows/e2e-test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: E2E Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- release-*
8+
tags:
9+
- v*
10+
workflow_dispatch: { }
11+
pull_request:
12+
branches:
13+
- master
14+
- release-*
15+
16+
env:
17+
# Common versions
18+
GO_VERSION: '1.20'
19+
KIND_VERSION: 'v0.18.0'
20+
KIND_IMAGE: 'kindest/node:v1.26.3'
21+
KIND_CLUSTER_NAME: 'ci-testing'
22+
23+
jobs:
24+
e2e-test:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
submodules: true
31+
- name: Setup Go
32+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
33+
with:
34+
go-version: ${{ env.GO_VERSION }}
35+
- name: Setup Kind Cluster
36+
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
37+
with:
38+
node_image: ${{ env.KIND_IMAGE }}
39+
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
40+
version: ${{ env.KIND_VERSION }}
41+
42+
- name: Install dependencies
43+
run: go mod download
44+
45+
- name: Run E2E tests
46+
run: go test -v ./tests/e2e/...

Makefile

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,27 @@ else
66
GOBIN=$(shell go env GOBIN)
77
endif
88

9+
KIND_VERSION ?= v0.18.0
10+
CLUSTER_NAME ?= rollout-ci-testing
11+
12+
all: generate gen-openapi-schema
13+
914
# Run go vet against code
1015
vet:
1116
go vet ./...
1217

1318
# Generate code
14-
generate: controller-gen
15-
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./rollouts"
19+
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
20+
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./rollouts/..."
1621
@hack/generate_client.sh
1722

1823
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
24+
CONTROLLER_GEN_VERSION = v0.16.0
1925
controller-gen: ## Download controller-gen locally if necessary.
20-
ifeq ("$(shell $(CONTROLLER_GEN) --version 2> /dev/null)", "Version: v0.7.0")
26+
ifeq ("$(shell $(CONTROLLER_GEN) --version)", "Version: ${CONTROLLER_GEN_VERSION}")
2127
else
2228
rm -rf $(CONTROLLER_GEN)
23-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0)
29+
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION})
2430
endif
2531

2632
OPENAPI_GEN = $(shell pwd)/bin/openapi-gen
@@ -47,6 +53,28 @@ rm -rf $$TMP_DIR ;\
4753
}
4854
endef
4955

56+
ensure-kind:
57+
ifeq ("$(shell command -v $(PROJECT_DIR)/bin/kind 2> /dev/null)", "")
58+
@echo "Downloading kind version $(KIND_VERSION)"
59+
GOBIN=$(PROJECT_DIR)/bin go install sigs.k8s.io/kind@$(KIND_VERSION)
60+
else
61+
@echo "kind is already installed."
62+
endif
63+
64+
delete-cluster: ensure-kind
65+
@echo "Deleting kind cluster $(CLUSTER_NAME) if it exists"
66+
bin/kind delete cluster --name $(CLUSTER_NAME) || true
67+
68+
create-cluster: ensure-kind
69+
bin/kind create cluster --name $(CLUSTER_NAME)
70+
71+
.PHONY: run-e2e-test
72+
run-e2e-test:
73+
@echo "Installing Rollouts CRDs"
74+
kubectl apply -f https://raw.githubusercontent.com/openkruise/rollouts/refs/heads/master/config/crd/bases/rollouts.kruise.io_rollouts.yaml
75+
@echo "Running E2E tests"
76+
go test -v ./tests/e2e/...
77+
5078
.PHONY: gen-schema-only
5179
gen-schema-only:
5280
go run cmd/gen-schema/main.go

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ The canonical location of the Kruise Rollout API definition and client.
44

55
## Compatibility matrix
66

7-
| Kruise-Rollout-API | Kruise-rollout |
8-
|--------------------|------------------|
9-
| 0.4.1 | <= 0.4 |
10-
| 0.5.1 | 0.5 |
7+
| Kruise-Rollout-API | Kruise-rollout |
8+
|--------------------|----------------|
9+
| 0.4.1 | <= 0.4 |
10+
| 0.5.1 | 0.5 |
11+
| 0.6.0 | 0.6 |
1112

1213
## Where does it come from?
1314

client/clientset/versioned/clientset.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/clientset/versioned/typed/rollouts/v1beta1/batchrelease.go

Lines changed: 0 additions & 195 deletions
This file was deleted.

0 commit comments

Comments
 (0)