build: publish and promote helm charts
we now support charts.rook.io
This commit is contained in:
1 parent
556d221c93
commit
9f6d3798e5
3 files changed
+23
-14
No files matched your search
@@ -86,6 +86,9 @@ GO_TEST_SUITE=$(SUITE)
|
||||
|
||||
include build/makelib/golang.mk
|
||||
|
||||
# setup helm charts
|
||||
include build/makelib/helm.mk
|
||||
|
||||
# ====================================================================================
|
||||
# Targets
|
||||
|
||||
@@ -93,10 +96,9 @@ build.version:
|
||||
@mkdir -p $(OUTPUT_DIR)
|
||||
@echo "$(VERSION)" > $(OUTPUT_DIR)/version
|
||||
|
||||
build.common: build.version
|
||||
build.common: build.version helm.build
|
||||
@$(MAKE) go.init
|
||||
@$(MAKE) go.validate
|
||||
@$(MAKE) -C cluster/charts
|
||||
|
||||
do.build.platform.%:
|
||||
@$(MAKE) PLATFORM=$* go.build
|
||||
|
||||
@@ -12,18 +12,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# remove default suffixes as we dont use them
|
||||
.SUFFIXES:
|
||||
|
||||
# include the common make file
|
||||
include ../../build/makelib/common.mk
|
||||
|
||||
.PHONY: all
|
||||
all: build
|
||||
|
||||
# the helm charts to build
|
||||
HELM_CHARTS ?= rook
|
||||
HELM_URL ?= https://release.rook.io/charts
|
||||
HELM_BASE_URL ?= https://charts.rook.io
|
||||
HELM_S3_BUCKET ?= rook-charts
|
||||
HELM_CHARTS_DIR ?= $(ROOT_DIR)/cluster/charts
|
||||
HELM_OUTPUT_DIR ?= $(OUTPUT_DIR)/charts
|
||||
|
||||
@@ -59,4 +51,4 @@ $(HELM_INDEX): $(HELM) $(HELM_OUTPUT_DIR)
|
||||
@echo === helm index
|
||||
@$(HELM) repo index $(HELM_OUTPUT_DIR)
|
||||
|
||||
build: $(HELM_INDEX)
|
||||
helm.build: $(HELM_INDEX)
|
||||
+16
-1
@@ -15,6 +15,7 @@
|
||||
all: build
|
||||
|
||||
include ../makelib/common.mk
|
||||
include ../makelib/helm.mk
|
||||
|
||||
# ====================================================================================
|
||||
# Options
|
||||
@@ -48,7 +49,7 @@ REMOTE_NAME ?= origin
|
||||
PLATFORMS ?= $(ALL_PLATFORMS)
|
||||
|
||||
ifneq ($(filter master release-%,$(BRANCH_NAME)),)
|
||||
FLAVORS ?= output images docs
|
||||
FLAVORS ?= output images docs helm
|
||||
else
|
||||
FLAVORS ?= output
|
||||
override BRANCH_NAME := pr/$(BRANCH_NAME)
|
||||
@@ -124,6 +125,20 @@ build.docs:
|
||||
publish.docs:
|
||||
$(DOCS_WORK_DIR)/build/publish.sh
|
||||
|
||||
# ====================================================================================
|
||||
# helm
|
||||
|
||||
HELM_TEMP := $(shell mktemp -d)
|
||||
HELM_URL := $(HELM_BASE_URL)/$(CHANNEL)
|
||||
|
||||
promote.helm:
|
||||
# copy existing charts to a temp dir, the combine with new charts, reindex, and upload
|
||||
@$(S3_SYNC) s3://$(HELM_S3_BUCKET)/$(CHANNEL) $(HELM_TEMP)
|
||||
@$(S3_SYNC) s3://$(S3_BUCKET)/build/$(BRANCH_NAME)/$(VERSION)/charts $(HELM_TEMP)
|
||||
@$(HELM) repo index --url $(HELM_URL) $(HELM_TEMP)
|
||||
@$(S3_SYNC) $(HELM_TEMP) s3://$(HELM_S3_BUCKET)/$(CHANNEL)
|
||||
@rm -fr $(HELM_TEMP)
|
||||
|
||||
# ====================================================================================
|
||||
# output
|
||||
|
||||
|
||||
Reference in new issue
Block a user