mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-27 14:37:17 +00:00
Added workflow files for Jenkins replacement
This commit is contained in:
@@ -49,3 +49,55 @@ apply:
|
||||
kubectl apply -f deployments/manifests/ -n temp-reloader
|
||||
|
||||
deploy: binary-image push apply
|
||||
|
||||
# find or download controller-gen
|
||||
# download controller-gen if necessary
|
||||
controller-gen:
|
||||
ifeq (, $(shell which controller-gen))
|
||||
@{ \
|
||||
set -e ;\
|
||||
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
|
||||
cd $$CONTROLLER_GEN_TMP_DIR ;\
|
||||
go mod init tmp ;\
|
||||
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0 ;\
|
||||
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
|
||||
}
|
||||
CONTROLLER_GEN=$(GOBIN)/controller-gen
|
||||
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
|
||||
|
||||
# Bump Chart
|
||||
bump-chart: bump-chart-operator
|
||||
|
||||
|
||||
generate-crds: controller-gen
|
||||
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=charts/managed-openshift-operator/crds
|
||||
Reference in New Issue
Block a user