Add chart-tools and chart-releaser for helm (#7095)

**What this PR does / why we need it**:

Adds the `chart-tools` and `chart-releaser` binaries to the nix shell
for doing helm releases/testing.
pull/7063/head^2
Trevor Whitney 4 years ago committed by GitHub
parent 57a1193d93
commit 7d750ea564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      flake.nix
  2. 37
      nix/chart-releaser.nix
  3. 4
      nix/default.nix

@ -129,6 +129,8 @@
golangci-lint
helm-docs
faillint
chart-testing
chart-releaser
];
shellHook = ''

@ -0,0 +1,37 @@
{ pkgs, lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "chart-releaser";
version = "1.4.0";
src = fetchFromGitHub {
owner = "helm";
repo = pname;
rev = "v${version}";
sha256 = "1x3r4cyzk4p9shbg2xzgvfbfk9kc12hqy9xzpd6l0fbyhdh91qxw";
};
vendorSha256 = "GYsP5LXZA/swgg7xsOkOAITj/E7euEpP0Uk2KzUzBbI=";
postPatch = ''
substituteInPlace pkg/config/config.go \
--replace "\"/etc/cr\"," "\"$out/etc/cr\","
'';
ldflags = [
"-w"
"-s"
"-X github.com/helm/chart-testing/v3/ct/cmd.Version=${version}"
"-X github.com/helm/chart-testing/v3/ct/cmd.GitCommit=${src.rev}"
"-X github.com/helm/chart-testing/v3/ct/cmd.BuildDate=19700101-00:00:00"
];
# tests require git to be available
nativeBuildInputs = with pkgs; [ git installShellFiles ];
postInstall = ''
installShellCompletion --cmd cr \
--bash <($out/bin/cr completion bash) \
--zsh <($out/bin/cr completion zsh) \
--fish <($out/bin/cr completion fish) \
'';
}

@ -37,5 +37,9 @@ in {
faillint = prev.callPackage ./faillint.nix {
inherit (prev) lib buildGoModule fetchFromGitHub;
};
chart-releaser = prev.callPackage ./chart-releaser.nix {
inherit (prev) pkgs lib buildGoModule fetchFromGitHub;
};
};
}

Loading…
Cancel
Save