Updates to workflow and few path updates

This commit is contained in:
talha0324
2021-01-18 17:43:07 +05:00
parent 58c622eb91
commit 1490a1feaa
2 changed files with 9 additions and 36 deletions

View File

@@ -67,37 +67,10 @@ else
CONTROLLER_GEN=$(shell which controller-gen)
endif
kustomize:
ifeq (, $(shell which kustomize))
@{ \
set -e ;\
KUSTOMIZE_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$KUSTOMIZE_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/kustomize/kustomize/v3@v3.5.4 ;\
rm -rf $$KUSTOMIZE_GEN_TMP_DIR ;\
}
KUSTOMIZE=$(GOBIN)/kustomize
else
KUSTOMIZE=$(shell which kustomize)
endif
# Generate bundle manifests and metadata, then validate generated files.
.PHONY: bundle
bundle: manifests
operator-sdk generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
operator-sdk bundle validate ./bundle
bump-chart-operator:
sed -i "s/^version:.*/version: $(VERSION)/" charts/managed-openshift-operator/Chart.yaml
sed -i "s/^appVersion:.*/appVersion: $(VERSION)/" charts/managed-openshift-operator/Chart.yaml
sed -i "s/tag:.*/tag: v$(VERSION)/" charts/managed-openshift-operator/values.yaml
sed -i "s/^version:.*/version: $(VERSION)/" deployments/kubernetes/chart/reloader/Chart.yaml
sed -i "s/^appVersion:.*/appVersion: $(VERSION)/" deployments/kubernetes/chart/reloader/Chart.yaml
sed -i "s/tag:.*/tag: v$(VERSION)/" deployments/kubernetes/chart/reloader/values.yaml
# Bump Chart
bump-chart: bump-chart-operator
generate-crds: controller-gen
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=charts/managed-openshift-operator/crds