fix: Reuse MakeFile chectl-templ function in the CI tests. (#948)

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
pull/1242/head
Oleksandr Andriienko 2021-12-08 19:46:59 +02:00 committed by GitHub
parent 51f21b7738
commit 942960f99c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 16 deletions

16
.github/bin/common.sh vendored
View File

@ -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(){

View File

@ -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