Skip to content

Commit

Permalink
Create helm2, helm3, and kubectl-1.15 packages (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru committed Jan 18, 2020
1 parent 1bbb700 commit f2586ce
Show file tree
Hide file tree
Showing 34 changed files with 194 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ vendor/goofys: vendor/goofys/**
vendor/gosu: vendor/gosu/**
vendor/gotop: vendor/gotop/**
vendor/helm: vendor/helm/**
vendor/helm2: vendor/helm2/**
vendor/helm3: vendor/helm3/**
vendor/helmfile: vendor/helmfile/**
vendor/htmltest: vendor/htmltest/**
vendor/hugo: vendor/hugo/**
Expand All @@ -65,6 +67,7 @@ vendor/krew: vendor/krew/**
vendor/kubecron: vendor/kubecron/**
vendor/kubectl-1.13: vendor/kubectl-1.13/**
vendor/kubectl-1.14: vendor/kubectl-1.14/**
vendor/kubectl-1.15: vendor/kubectl-1.15/**
vendor/kubectl: vendor/kubectl/**
vendor/kubectx: vendor/kubectx/**
vendor/kubens: vendor/kubens/**
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ goofys 0.23.1 a high-performance, POSIX-ish Amazon S3 fil
gosu 1.11 Simple Go-based setuid+setgid+setgroups+exec
gotop 3.0.0 A terminal based graphical activity monitor inspired by gtop and vtop
helm 3.0.2 The Kubernetes Package Manager
helm2 2.16.1 The Kubernetes Package Manager
helm3 3.0.2 The Kubernetes Package Manager
helmfile 0.98.2 Deploy Kubernetes Helm Charts
htmltest 0.11.0 :white_check_mark: Test generated HTML for problems
hugo 0.62.2 The world’s fastest framework for building websites.
Expand All @@ -297,8 +299,9 @@ kops-1.12 1.12.3 Kubernetes Operations (kops) - Production G
krew 0.3.3 Kubectl plugin manager
kubecron 1.0.2 Utilities to manage kubernetes cronjobs. Run a CronJob manually for test purposes. Suspend/unsuspend a CronJob
kubectl 1.15.8 Production-Grade Container Scheduling and Management
kubectl-1.13 1.13.11 Production-Grade Container Scheduling and Management
kubectl-1.14 1.14.7 Production-Grade Container Scheduling and Management
kubectl-1.13 1.13.12 Production-Grade Container Scheduling and Management
kubectl-1.14 1.14.10 Production-Grade Container Scheduling and Management
kubectl-1.15 1.15.8 Production-Grade Container Scheduling and Management
kubectx 0.7.1 Switch faster between clusters and namespaces in kubectl
kubens 0.7.1 Switch faster between clusters and namespaces in kubectl
lazydocker 0.7.6 The lazier way to manage everything docker
Expand Down
2 changes: 1 addition & 1 deletion apk/templates/APKBUILD.github-binary
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ build() {
# This function is called right after the build stage.
# It should check that the packaged thing is actually working
check() {
make -C ${APK_TMP_DIR} --no-print-directory -s test PATH=$PATH:$srcdir HOME=/tmp
make -C ${APK_TMP_DIR} --no-print-directory -s test PATH="$PATH:$srcdir" HOME=/tmp
}

# This is the packaging stage.
Expand Down
7 changes: 5 additions & 2 deletions docs/targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ goofys 0.23.1 a high-performance, POSIX-ish Amazon S3 fil
gosu 1.11 Simple Go-based setuid+setgid+setgroups+exec
gotop 3.0.0 A terminal based graphical activity monitor inspired by gtop and vtop
helm 3.0.2 The Kubernetes Package Manager
helm2 2.16.1 The Kubernetes Package Manager
helm3 3.0.2 The Kubernetes Package Manager
helmfile 0.98.2 Deploy Kubernetes Helm Charts
htmltest 0.11.0 :white_check_mark: Test generated HTML for problems
hugo 0.62.2 The world’s fastest framework for building websites.
Expand All @@ -48,8 +50,9 @@ kops-1.12 1.12.3 Kubernetes Operations (kops) - Production G
krew 0.3.3 Kubectl plugin manager
kubecron 1.0.2 Utilities to manage kubernetes cronjobs. Run a CronJob manually for test purposes. Suspend/unsuspend a CronJob
kubectl 1.15.8 Production-Grade Container Scheduling and Management
kubectl-1.13 1.13.11 Production-Grade Container Scheduling and Management
kubectl-1.14 1.14.7 Production-Grade Container Scheduling and Management
kubectl-1.13 1.13.12 Production-Grade Container Scheduling and Management
kubectl-1.14 1.14.10 Production-Grade Container Scheduling and Management
kubectl-1.15 1.15.8 Production-Grade Container Scheduling and Management
kubectx 0.7.1 Switch faster between clusters and namespaces in kubectl
kubens 0.7.1 Switch faster between clusters and namespaces in kubectl
lazydocker 0.7.6 The lazier way to manage everything docker
Expand Down
2 changes: 1 addition & 1 deletion tasks/Makefile.package
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ CURRENT_VERSION: API=releases/latest
CURRENT_VERSION: QUERY=.tag_name
CURRENT_VERSION:
@local_version=$$(cat VERSION || echo 0); \
current_version=$$(env PATH=$(PATH) github-repo-metadata $(VENDOR) $(PACKAGE_REPO_NAME) '$(API)' '$(QUERY)' | sed 's/^v//'); \
current_version=$$(env PATH='$(PATH)' github-repo-metadata $(VENDOR) $(PACKAGE_REPO_NAME) '$(API)' '$(QUERY)' | sed 's/^v//'); \
if [ $$? -ne 0 ]; then \
exit 1; \
elif [ "$${current_version}" == "null" -o -z "$${current_version}" ]; then \
Expand Down
2 changes: 1 addition & 1 deletion vendor/duffle/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export PACKAGE_NAME = duffle
export PACKAGE_REPO_NAME = duffle

export GITHUB_VERSION := $(shell cat VERSION)
export PACKAGE_VERSION := $(shell echo ${GITHUB_VERSION} | sed -E 's/\-beta\.([0-9]++)/b\1/')
export PACKAGE_VERSION := $(shell echo ${GITHUB_VERSION} | sed -E 's/\-beta\.([0-9]+)/b\1/')
export DOWNLOAD_URL = $(PACKAGE_REPO_URL)/releases/download/$(GITHUB_VERSION)/duffle-$(OS)-$(ARCH)

## APK build specific requirements
Expand Down
3 changes: 3 additions & 0 deletions vendor/helm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ include ../../tasks/Makefile.apk
export VENDOR ?= helm
export DOWNLOAD_URL ?= https://get.helm.sh/helm-v$(PACKAGE_VERSION)-$(OS)-$(ARCH).tar.gz
export APK_BUILD_TEMPLATE ?= APKBUILD.github-binary
export APKBUILD_INSTALL_SCRIPTS = $(PACKAGE_NAME).post-install $(PACKAGE_NAME).post-deinstall
export MAJOR_VERSION = latest
export INSTALL_DIR = /usr/share/${PACKAGE_NAME}/${MAJOR_VERSION}/bin

install:
mkdir -p $(TMP)/$(PACKAGE_NAME)
Expand Down
8 changes: 8 additions & 0 deletions vendor/helm/helm.post-deinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
# This is an Alpine `deinstall` hook that removes the alternative
MASTER_PACKAGE_NAME=helm
MAJOR_VERSION=latest
PACKAGE_NAME=${MASTER_PACKAGE_NAME}
INSTALL_DIR=/usr/share/${PACKAGE_NAME}/${MAJOR_VERSION}/bin
update-alternatives --remove ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
exit 0
10 changes: 10 additions & 0 deletions vendor/helm/helm.post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
# This is an Alpine Package `post-install` hook that links
# an alternative from `/usr/share/${PACKAGE_NAME}/$version/bin` into `/usr/bin/`
MASTER_PACKAGE_NAME=helm
MAJOR_VERSION=latest
PACKAGE_NAME=${MASTER_PACKAGE_NAME}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin
mkdir -p ${INSTALL_DIR}
update-alternatives --install /usr/bin/${MASTER_PACKAGE_NAME} ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 99
exit 0
1 change: 1 addition & 0 deletions vendor/helm2/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Kubernetes Package Manager
1 change: 1 addition & 0 deletions vendor/helm2/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APACHE-2.0
28 changes: 28 additions & 0 deletions vendor/helm2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export MASTER_PACKAGE_NAME = helm
export MAJOR_VERSION = 2
export PACKAGE_NAME = $(MASTER_PACKAGE_NAME)$(MAJOR_VERSION)
export PACKAGE_REPO_NAME = helm
export DOWNLOAD_URL ?= https://get.helm.sh/helm-v$(PACKAGE_VERSION)-$(OS)-$(ARCH).tar.gz

include ../../tasks/Makefile.package
include ../../tasks/Makefile.apk

# Package details
export VENDOR ?= helm
export APK_BUILD_TEMPLATE ?= APKBUILD.github-binary
export AUTO_UPDATE_ENABLED = false
export APKBUILD_INSTALL_SCRIPTS = $(PACKAGE_NAME).post-install $(PACKAGE_NAME).post-deinstall
export INSTALL_DIR = /usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin

install:
mkdir -p $(TMP)/$(PACKAGE_NAME)
$(CURL) -o - $(DOWNLOAD_URL) | tar -C $(TMP)/$(PACKAGE_NAME) -zx $(OS)-$(ARCH)/helm
mv $(TMP)/$(PACKAGE_NAME)/$(OS)-$(ARCH)/helm $(INSTALL_PATH)/$(PACKAGE_NAME)
rm -rf $(TMP)/$(PACKAGE_NAME)
chmod +x $(INSTALL_PATH)/$(PACKAGE_NAME)

test:
($(PACKAGE_NAME) version || true) 2>&1 | grep Version

package/prepare::
mv src/$(OS)-$(ARCH)/helm src/helm2
1 change: 1 addition & 0 deletions vendor/helm2/RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
1 change: 1 addition & 0 deletions vendor/helm2/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.16.1
9 changes: 9 additions & 0 deletions vendor/helm2/helm2.post-deinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# This is an Alpine `deinstall` hook that removes the alternative
MASTER_PACKAGE_NAME=helm
MAJOR_VERSION=2
PACKAGE_NAME=${MASTER_PACKAGE_NAME}${MAJOR_VERSION}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin
update-alternatives --remove ${PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
update-alternatives --remove ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
exit 0
12 changes: 12 additions & 0 deletions vendor/helm2/helm2.post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# This is an Alpine Package `post-install` hook that links
# an alternative from `/usr/share/${PACKAGE_NAME}/$version/bin` into `/usr/bin/`
MASTER_PACKAGE_NAME=helm
MAJOR_VERSION=2
PACKAGE_NAME=${MASTER_PACKAGE_NAME}${MAJOR_VERSION}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin

mkdir -p ${INSTALL_DIR}
update-alternatives --install /usr/bin/${PACKAGE_NAME} ${PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 1
update-alternatives --install /usr/bin/${MASTER_PACKAGE_NAME} ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 21
exit 0
1 change: 1 addition & 0 deletions vendor/helm3/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Kubernetes Package Manager
1 change: 1 addition & 0 deletions vendor/helm3/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APACHE-2.0
28 changes: 28 additions & 0 deletions vendor/helm3/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export MASTER_PACKAGE_NAME = helm
export MAJOR_VERSION = 3
export PACKAGE_NAME = $(MASTER_PACKAGE_NAME)$(MAJOR_VERSION)
export PACKAGE_REPO_NAME = helm
export DOWNLOAD_URL ?= https://get.helm.sh/helm-v$(PACKAGE_VERSION)-$(OS)-$(ARCH).tar.gz

include ../../tasks/Makefile.package
include ../../tasks/Makefile.apk

# Package details
export VENDOR ?= helm
export APK_BUILD_TEMPLATE ?= APKBUILD.github-binary
export AUTO_UPDATE_ENABLED = false
export APKBUILD_INSTALL_SCRIPTS = $(PACKAGE_NAME).post-install $(PACKAGE_NAME).post-deinstall
export INSTALL_DIR = /usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin

install:
mkdir -p $(TMP)/$(PACKAGE_NAME)
$(CURL) -o - $(DOWNLOAD_URL) | tar -C $(TMP)/$(PACKAGE_NAME) -zx $(OS)-$(ARCH)/helm
mv $(TMP)/$(PACKAGE_NAME)/$(OS)-$(ARCH)/helm $(INSTALL_PATH)/$(PACKAGE_NAME)
rm -rf $(TMP)/$(PACKAGE_NAME)
chmod +x $(INSTALL_PATH)/$(PACKAGE_NAME)

test:
($(PACKAGE_NAME) version || true) 2>&1 | grep Version

package/prepare::
mv src/$(OS)-$(ARCH)/helm src/helm3
1 change: 1 addition & 0 deletions vendor/helm3/RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
1 change: 1 addition & 0 deletions vendor/helm3/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.2
9 changes: 9 additions & 0 deletions vendor/helm3/helm3.post-deinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# This is an Alpine `deinstall` hook that removes the alternative
MASTER_PACKAGE_NAME=helm
MAJOR_VERSION=3
PACKAGE_NAME=${MASTER_PACKAGE_NAME}${MAJOR_VERSION}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin
update-alternatives --remove ${PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
update-alternatives --remove ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
exit 0
12 changes: 12 additions & 0 deletions vendor/helm3/helm3.post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# This is an Alpine Package `post-install` hook that links
# an alternative from `/usr/share/${PACKAGE_NAME}/$version/bin` into `/usr/bin/`
MASTER_PACKAGE_NAME=helm
MAJOR_VERSION=3
PACKAGE_NAME=${MASTER_PACKAGE_NAME}${MAJOR_VERSION}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin

mkdir -p ${INSTALL_DIR}
update-alternatives --install /usr/bin/${PACKAGE_NAME} ${PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 1
update-alternatives --install /usr/bin/${MASTER_PACKAGE_NAME} ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 31
exit 0
2 changes: 1 addition & 1 deletion vendor/kfctl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include ../../tasks/Makefile.package
include ../../tasks/Makefile.apk

# Package details
export DOWNLOAD_URL := $(shell env PATH=$(PATH) github-repo-metadata $(VENDOR) $(PACKAGE_REPO_NAME) 'releases/tags/v$(PACKAGE_VERSION)' '.assets | .[] | .browser_download_url | select(.|contains("$(OS)"))')
export DOWNLOAD_URL := $(shell env PATH='$(PATH)' github-repo-metadata $(VENDOR) $(PACKAGE_REPO_NAME) 'releases/tags/v$(PACKAGE_VERSION)' '.assets | .[] | .browser_download_url | select(.|contains("$(OS)"))')

install:
$(call download_tarball)
Expand Down
2 changes: 1 addition & 1 deletion vendor/kubectl-1.13/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.11
1.13.12
2 changes: 1 addition & 1 deletion vendor/kubectl-1.14/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.14.7
1.14.10
2 changes: 1 addition & 1 deletion vendor/kubectl-1.14/kubectl-1.14.post-deinstall
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# This is an Alpine `deinstall` hook that removes the alternative
MASTER_PACKAGE_NAME=kubectl
MAJOR_VERSION=1.13
MAJOR_VERSION=1.14
PACKAGE_NAME=${MASTER_PACKAGE_NAME}-${MAJOR_VERSION}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin
update-alternatives --remove ${PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
Expand Down
1 change: 1 addition & 0 deletions vendor/kubectl-1.15/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Production-Grade Container Scheduling and Management
1 change: 1 addition & 0 deletions vendor/kubectl-1.15/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APACHE-2.0
22 changes: 22 additions & 0 deletions vendor/kubectl-1.15/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export MASTER_PACKAGE_NAME = kubectl
export MAJOR_VERSION = 1.15
export PACKAGE_NAME = $(MASTER_PACKAGE_NAME)-$(MAJOR_VERSION)
export PACKAGE_REPO_NAME = kubernetes

include ../../tasks/Makefile.package
include ../../tasks/Makefile.apk

# Package details
export VENDOR = kubernetes
export DOWNLOAD_URL = https://storage.googleapis.com/kubernetes-release/release/v$(PACKAGE_VERSION)/bin/$(OS)/$(ARCH)/kubectl
export APK_BUILD_TEMPLATE = APKBUILD.github-binary
export APKBUILD_DEPENDS += dpkg
export APKBUILD_INSTALL_SCRIPTS = $(PACKAGE_NAME).post-install $(PACKAGE_NAME).post-deinstall
export INSTALL_DIR = /usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin
export AUTO_UPDATE_ENABLED = false

install:
$(call download_binary)

test:
$(PACKAGE_EXE) --help
1 change: 1 addition & 0 deletions vendor/kubectl-1.15/RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
1 change: 1 addition & 0 deletions vendor/kubectl-1.15/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.15.8
9 changes: 9 additions & 0 deletions vendor/kubectl-1.15/kubectl-1.15.post-deinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# This is an Alpine `deinstall` hook that removes the alternative
MASTER_PACKAGE_NAME=kubectl
MAJOR_VERSION=1.15
PACKAGE_NAME=${MASTER_PACKAGE_NAME}-${MAJOR_VERSION}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin
update-alternatives --remove ${PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
update-alternatives --remove ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
exit 0
12 changes: 12 additions & 0 deletions vendor/kubectl-1.15/kubectl-1.15.post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# This is an Alpine Package `post-install` hook that links
# an alternative from `/usr/share/${PACKAGE_NAME}/$version/bin` into `/usr/bin/`
MASTER_PACKAGE_NAME=kubectl
MAJOR_VERSION=1.15
PACKAGE_NAME=${MASTER_PACKAGE_NAME}-${MAJOR_VERSION}
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${MAJOR_VERSION}/bin

mkdir -p ${INSTALL_DIR}
update-alternatives --install /usr/bin/${PACKAGE_NAME} ${PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 1
update-alternatives --install /usr/bin/${MASTER_PACKAGE_NAME} ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 15
exit 0

0 comments on commit f2586ce

Please sign in to comment.