testing/helm-mapkubeapis: new aport

This commit is contained in:
Hoang Nguyen 2025-01-08 00:00:00 +07:00 committed by Patrycja Rosa
parent f71c8d1887
commit d0a9b1386d
2 changed files with 52 additions and 0 deletions
testing/helm-mapkubeapis

View file

@ -0,0 +1,46 @@
maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=helm-mapkubeapis
pkgver=0.5.2
pkgrel=0
pkgdesc="Helm plugin to map deprecated or removed Kubernetes APIs to supported ones"
url="https://github.com/helm/helm-mapkubeapis"
arch="all"
license="Apache-2.0"
makedepends="go"
source="
$pkgname-$pkgver.tar.gz::https://github.com/helm/helm-mapkubeapis/archive/refs/tags/v$pkgver.tar.gz
helm-mapkubeapis.pre-install
"
options="net" # download Go modules
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
go build -v ./cmd/mapkubeapis/
}
check() {
go test ./...
}
package() {
install -Dm755 mapkubeapis "$pkgdir/usr/share/helm/plugins/mapkubeapis/bin/mapkubeapis"
cat <<-EOF > "$pkgdir/usr/share/helm/plugins/mapkubeapis/plugin.yaml"
name: "mapkubeapis"
version: "$pkgver"
usage: "Map release deprecated Kubernetes APIs in-place"
description: "Map release deprecated Kubernetes APIs in-place"
platformCommand:
- os: "$(go env GOOS)"
arch: "$(go env GOARCH)"
command: "\${HELM_PLUGIN_DIR}/bin/mapkubeapis"
EOF
}
sha512sums="
5f2f29834d087e462f30f94952ae092af279f9175f432196efef032ec39fc1277db1c9ef449ee01336313825500a9255d9d6965187f0b29786c7f78ca543f0e8 helm-mapkubeapis-0.5.2.tar.gz
f9fddf3b616f88365fca89bd5a529e9a0acb915ec74580e9dcd23ea31ad46ff9fa0878fe5eb6d314e33ff30532483fac3267e80c3df530fff09d5574cce84e25 helm-mapkubeapis.pre-install
"

View file

@ -0,0 +1,6 @@
#!/bin/sh
cat >&2 <<EOF
* To install helm-mapkubeapis plugin for the current user, run
* 'helm plugin install /usr/share/helm/plugins/mapkubeapis'.
EOF