blob: a129b2373b84aa87962fb6e9d59cdbed42b45dda [file] [log] [blame]
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00001{ pkgs, lib, buildGoModule, dockerTools, rev }:
2rec {
3 loki-helm-test = buildGoModule rec {
4 pname = "loki-helm-test";
5 version = "0.1.0";
6
7 src = ./../../../../..;
Giovanni Tirloni52306ad2024-04-12 15:35:05 -03008 vendorHash = null;
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00009
10 buildPhase = ''
11 runHook preBuild
12 go test --tags=helm_test -c -o $out/bin/helm-test ./production/helm/loki/src/helm-test
13 runHook postBuild
14 '';
15
16 doCheck = false;
17 };
18
19 # by default, uses the nix hash as the tag, which can be retrieved with:
20 # basename "$(readlink result)" | cut -d - -f 1
21 loki-helm-test-docker = dockerTools.buildImage {
22 name = "grafana/loki-helm-test";
23 config = {
24 Entrypoint = [ "${loki-helm-test}/bin/helm-test" ];
25 };
26 };
27}