Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ spec:
served: true
storage: true
subresources:
status: {}
status: {}
4 changes: 4 additions & 0 deletions makefiles/const.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 8 additions & 2 deletions makefiles/dependency.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
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"
Loading