Skip to content

Commit a365a2a

Browse files
Simon Emmsroboquat
Simon Emms
authored andcommitted
[kots]: add command for getting helm dependencies
1 parent 05c3951 commit a365a2a

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.werft/jobs/build/build-and-publish.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ function publishKots(werft: Werft, jobConfig: JobConfig) {
154154
{ slice: phases.PUBLISH_KOTS },
155155
);
156156

157-
// Generate the logo
158-
exec(`make logo -C ${REPLICATED_DIR}`, { slice: phases.PUBLISH_KOTS });
157+
// Generate the logo and pull any Helm charts
158+
exec(`make logo helm -C ${REPLICATED_DIR}`, { slice: phases.PUBLISH_KOTS });
159159

160160
// Update the additionalImages in the kots-app.yaml
161161
exec(`/tmp/installer mirror kots --file ${REPLICATED_YAML_DIR}/kots-app.yaml`, { slice: phases.PUBLISH_KOTS });

install/kots/BUILD.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ packages:
1111
- REPLICATED_APP
1212
config:
1313
commands:
14-
- ["make", "lint"]
14+
- ["make", "helm", "lint"]

install/kots/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
CHANNEL_STABLE = Stable
22
CHANNEL_BETA = Beta
33
CHANNEL_UNSTABLE = Unstable
4+
CHARTS_DIR = charts
45
YAML_DIR = manifests
56

6-
all: logo lint create_dev_release
7+
all: logo helm lint create_dev_release
78

89
create_dev_release:
910
@if [ "${REPLICATED_DEV_CHANNEL}" = "" ]; then \
@@ -23,6 +24,12 @@ create_unstable_release:
2324
replicated release create --lint --ensure-channel --yaml-dir ${YAML_DIR} --promote ${CHANNEL_UNSTABLE}
2425
.PHONY: create_unstable_release
2526

27+
helm:
28+
@echo "Installing Helm dependencies"
29+
@rm -f ${YAML_DIR}/*.tgz
30+
@for f in $(shell ls -d ${CHARTS_DIR}/*/); do cd $${f} && helm dep up && helm package . --destination ../../${YAML_DIR} && cd -; done
31+
.PHONY: helm
32+
2633
logo:
2734
@echo "Generating Base64 logo and saving to manifests/kots-app.yaml"
2835

@@ -32,4 +39,3 @@ logo:
3239
lint:
3340
replicated release lint --yaml-dir ${YAML_DIR}
3441
.PHONY: lint
35-

0 commit comments

Comments
 (0)