kubernetes-helmPlugins.helm-unittest: init at 0.3.3

This commit is contained in:
Eric Bailey 2023-06-24 22:55:03 -05:00 committed by Eric Bailey
parent 8c068dfddb
commit 1a07a20bc0
2 changed files with 36 additions and 0 deletions

View file

@ -12,4 +12,6 @@
helm-secrets = callPackage ./helm-secrets.nix { }; helm-secrets = callPackage ./helm-secrets.nix { };
helm-unittest = callPackage ./helm-unittest.nix { };
} }

View file

@ -0,0 +1,34 @@
{ buildGoModule, fetchFromGitHub, lib }:
buildGoModule rec {
pname = "helm-unittest";
version = "0.3.3";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-11rgARUfTbr8FkmR2lI4uoIqzi9cRuVPalUOsxsnO3E=";
};
vendorHash = "sha256-E9HSP8c/rGG+PLbnT8V5GflpnFItCeXyeLGiqDj4tRI=";
# NOTE: Remove the install and upgrade hooks.
postPatch = ''
sed -i '/^hooks:/,+2 d' plugin.yaml
'';
postInstall = ''
install -dm755 $out/${pname}
mv $out/bin/helm-unittest $out/${pname}/untt
rmdir $out/bin
install -m644 -Dt $out/${pname} plugin.yaml
'';
meta = with lib; {
description = "BDD styled unit test framework for Kubernetes Helm charts as a Helm plugin";
homepage = "https://github.com/helm-unittest/helm-unittest";
license = licenses.mit;
maintainers = with maintainers; [ yurrriq ];
};
}