Skip to content

Commit

Permalink
Add a docker image option for vendir.
Browse files Browse the repository at this point in the history
This will improve when carvel-dev/docker-image#16 is merged.

Signed-off-by: Pete Wall <pete.wall@grafana.com>
  • Loading branch information
petewall committed Nov 6, 2024
1 parent 93883f7 commit 57c63cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ installing them for a better experience:
- [helm-docs](https://github.com/norwoodj/helm-docs) - Used for generating Helm chart README.md files.
- [helm unittest](https://github.com/helm-unittest/helm-unittest) - Used for executing Helm chart unit tests.
- [shellspec](https://github.com/shellspec/shellspec) - Used for executing some unit tests.
- [vendir](https://carvel.dev/vendir/) - Used for downloading Alloy Module

Each chart has a Makefile with targets to automate much of the process.

Expand Down
5 changes: 5 additions & 0 deletions charts/k8s-monitoring/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
HAS_HELM_DOCS := $(shell command -v helm-docs;)
HAS_HELM_UNITTEST := $(shell helm plugin list | grep unittest 2> /dev/null)
HAS_SHELLSPEC := $(shell command -v shellspec;)
HAS_VENDIR := $(shell command -v vendir;)

CHART_TEMPLATE_FILES = $(shell find templates -name "*.tpl")
CHART_YAML_FILES = $(shell find templates -name "*.yaml")
Expand Down Expand Up @@ -53,7 +54,11 @@ templates/destinations/_destination_types.tpl: $(DESTINATION_VALUES_FILES)
echo '{{- end -}}' >> $@

alloyModules/LICENSE: vendir.yml vendir.lock.yml
ifdef HAS_VENDIR
vendir sync -l
else
docker run --rm --volume $(shell pwd):/src --workdir /src ghcr.io/carvel-dev/docker-image:latest bash -c "apt-get update && apt-get install -y git && vendir sync -l"
endif

values.schema.json: values.yaml $(DESTINATION_SCHEMA_FILES) $(SCHEMA_MODS_JSON_FILES) $(SCHEMA_MODS_JQ_FILES) schema-mods/destination-list.json
../../scripts/schema-gen.sh .
Expand Down

0 comments on commit 57c63cd

Please sign in to comment.