diff --git a/.github/bin/common.sh b/.github/bin/common.sh index 37d88d18d..05803ddd5 100755 --- a/.github/bin/common.sh +++ b/.github/bin/common.sh @@ -311,20 +311,8 @@ prepareTemplates() { exit 1 fi - mkdir -p "${SRC_TEMPLATES}" - - cp -f "${SRC_TEMPLATES}/config/manager/manager.yaml" "${TARGET_TEMPLATES}/operator.yaml" - - cp -rf "${SRC_TEMPLATES}/config/crd/bases/" "${TARGET_TEMPLATES}/crds/" - - cp -f "${SRC_TEMPLATES}/config/rbac/role.yaml" "${TARGET_TEMPLATES}/" - cp -f "${SRC_TEMPLATES}/config/rbac/role_binding.yaml" "${TARGET_TEMPLATES}/" - cp -f "${SRC_TEMPLATES}/config/rbac/cluster_role.yaml" "${TARGET_TEMPLATES}/" - cp -f "${SRC_TEMPLATES}/config/rbac/cluster_rolebinding.yaml" "${TARGET_TEMPLATES}/" - cp -f "${SRC_TEMPLATES}/config/rbac/service_account.yaml" "${TARGET_TEMPLATES}/" - - cp -f "${SRC_TEMPLATES}/config/samples/org.eclipse.che_v1_checluster.yaml" "${TARGET_TEMPLATES}/crds/org_v1_che_cr.yaml" - cp -f "${SRC_TEMPLATES}/config/crd/bases/org_v1_che_crd-v1beta1.yaml" "${TARGET_TEMPLATES}/crds/org_v1_che_crd-v1beta1.yaml" + local path=$(pwd) + cd ${OPERATOR_REPO}; make chectl-templ "SRC=${SRC_TEMPLATES}" "TARGET=${TARGET_TEMPLATES}"; cd "${path}" } deployEclipseCheStable(){ diff --git a/Makefile b/Makefile index cbb3d5748..edc3977a4 100644 --- a/Makefile +++ b/Makefile @@ -889,9 +889,9 @@ catalog-build: opm ## Build a catalog image. catalog-push: ## Push a catalog image. $(MAKE) docker-push IMG=$(CATALOG_IMG) +chectl-templ: SHELL := /bin/bash chectl-templ: - if [ -z "$(TARGET)" ]; - then echo "A"; + if [ -z "$(TARGET)" ]; then echo "[ERROR] Specify templates target location, using argument `TARGET`" exit 1 fi