diff --git a/charts/vela-workflow/crds/core.oam.dev_workflowstepdefinitions.yaml b/charts/vela-workflow/crds/core.oam.dev_workflowstepdefinitions.yaml index aa94cfc..ce9b076 100644 --- a/charts/vela-workflow/crds/core.oam.dev_workflowstepdefinitions.yaml +++ b/charts/vela-workflow/crds/core.oam.dev_workflowstepdefinitions.yaml @@ -219,4 +219,4 @@ spec: served: true storage: true subresources: - status: {} \ No newline at end of file + status: {} diff --git a/makefiles/const.mk b/makefiles/const.mk index e611cfb..5d8f724 100644 --- a/makefiles/const.mk +++ b/makefiles/const.mk @@ -70,5 +70,9 @@ VELA_RUNTIME_ROLLOUT_TEST_IMAGE ?= vela-runtime-rollout-test:$(GIT_COMMIT) RUNTIME_CLUSTER_CONFIG ?= /tmp/worker.client.kubeconfig RUNTIME_CLUSTER_NAME ?= worker +# KubeVela version/branch to fetch workflowstepdefinitions CRD from +KUBEVELA_VERSION ?= master +KUBEVELA_RAW_URL = https://raw.githubusercontent.com/kubevela/kubevela/$(KUBEVELA_VERSION)/charts/vela-core/crds + COMMON_CRD_FILES = \ core.oam.dev_workflows.yaml \ No newline at end of file diff --git a/makefiles/dependency.mk b/makefiles/dependency.mk index 8d61b29..7ba2f27 100644 --- a/makefiles/dependency.mk +++ b/makefiles/dependency.mk @@ -107,10 +107,16 @@ $(ENVTEST): $(LOCALBIN) .PHONY: sync-crds PKG_MODULE = github.com/kubevela/pkg # fetch common crds from the pkg repo instead of generating locally -sync-crds: ## Copy CRD from pinned module version in go.mod +sync-crds: ## Copy CRD from pinned module version in go.mod and fetch workflowstepdefinitions from kubevela repo + @echo "Syncing CRDs from pkg module..." @moddir=$$(go list -m -f '{{.Dir}}' $(PKG_MODULE) 2>/dev/null); \ mkdir -p config/crd/bases; \ for file in $(COMMON_CRD_FILES); do \ src="$$moddir/crds/$$file"; \ cp -f "$$src" "config/crd/bases/"; \ - done \ No newline at end of file + done + @echo "Fetching workflowstepdefinitions CRD from kubevela repo ($(KUBEVELA_VERSION))..." + @curl -fsSL $(KUBEVELA_RAW_URL)/core.oam.dev_workflowstepdefinitions.yaml \ + -o config/crd/bases/core.oam.dev_workflowstepdefinitions.yaml || \ + (echo "Failed to fetch workflowstepdefinitions CRD from kubevela repo" && exit 1) + @echo "Successfully synced all CRDs" \ No newline at end of file