File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 11HELM_HOME ?= $(shell helm home)
22VERSION := $(shell sed -n -e 's/version:[ "]* \([^"]* \) .*/\1/p' plugin.yaml)
33
4+ HELM_3_PLUGINS := $(shell bash -c 'eval $$(helm env ) ; echo $$HELM_PLUGINS')
5+
46PKG: = github.com/databus23/helm-diff
57LDFLAGS := -X $(PKG ) /cmd.Version=$(VERSION )
68
@@ -19,6 +21,12 @@ install: build
1921 cp bin/diff $(HELM_HOME ) /plugins/helm-diff/bin
2022 cp plugin.yaml $(HELM_HOME ) /plugins/helm-diff/
2123
24+ .PHONY : install/helm3
25+ install/helm3 :
26+ mkdir -p $(HELM_3_PLUGINS ) /helm-diff/bin
27+ cp bin/diff $(HELM_3_PLUGINS ) /helm-diff/bin
28+ cp plugin.yaml $(HELM_3_PLUGINS ) /helm-diff/
29+
2230.PHONY : lint
2331lint :
2432 scripts/update-gofmt.sh
@@ -70,3 +78,9 @@ ifndef GITHUB_TOKEN
7078 $(error GITHUB_TOKEN is undefined)
7179endif
7280 scripts/release.sh v$(VERSION) master
81+
82+ # Test for the plugin installation with `helm plugin install -v THIS_BRANCH` works
83+ # Useful for verifying modified `install-binary.sh` still works against various environments
84+ .PHONY : test-plugin-installation
85+ test-plugin-installation :
86+ docker build -f testdata/Dockerfile.install .
Original file line number Diff line number Diff line change 1+ FROM alpine/helm:2.16.9
2+
3+ ADD . /workspace
4+
5+ WORKDIR /workspace
6+
7+ RUN helm init -c
8+ RUN helm plugin install .
9+ RUN helm version -c
10+
11+ FROM alpine/helm:3.2.4
12+
13+ ADD . /workspace
14+
15+ WORKDIR /workspace
16+
17+ RUN helm plugin install .
18+ RUN helm version -c
19+
20+ FROM ubuntu:focal
21+
22+ ADD . /workspace
23+
24+ WORKDIR /workspace
25+
26+ # See "From Apt (Debian/Ubuntu)" at https://helm.sh/docs/intro/install/
27+ RUN apt-get update && \
28+ apt-get install curl && \
29+ curl https://helm.baltorepo.com/organization/signing.asc | sudo apt-key add - && \
30+ apt-get install apt-transport-https --yes && \
31+ echo "deb https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list && \
32+ apt-get update && \
33+ apt-get install helm
34+
35+ RUN helm plugin install .
36+ RUN helm version -c
You can’t perform that action at this time.
0 commit comments