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 1
1
HELM_HOME ?= $(shell helm home)
2
2
VERSION := $(shell sed -n -e 's/version:[ "]* \([^"]* \) .*/\1/p' plugin.yaml)
3
3
4
+ HELM_3_PLUGINS := $(shell bash -c 'eval $$(helm env ) ; echo $$HELM_PLUGINS')
5
+
4
6
PKG: = github.com/databus23/helm-diff
5
7
LDFLAGS := -X $(PKG ) /cmd.Version=$(VERSION )
6
8
@@ -19,6 +21,12 @@ install: build
19
21
cp bin/diff $(HELM_HOME ) /plugins/helm-diff/bin
20
22
cp plugin.yaml $(HELM_HOME ) /plugins/helm-diff/
21
23
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
+
22
30
.PHONY : lint
23
31
lint :
24
32
scripts/update-gofmt.sh
@@ -70,3 +78,9 @@ ifndef GITHUB_TOKEN
70
78
$(error GITHUB_TOKEN is undefined)
71
79
endif
72
80
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