Loading nixos/tests/prometheus/pushgateway.nix +3 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,9 @@ + "jq '.data.result[0].metric.version' | grep '\"${pkgs.prometheus-pushgateway.version}\"'" ) client.systemctl("start network-online.target") client.wait_for_unit("network-online.target") # Add a metric and check in Prometheus client.wait_until_succeeds( "echo 'some_metric 3.14' | curl --data-binary @- http://pushgateway:9091/metrics/job/some_job" Loading pkgs/by-name/pr/prometheus-pushgateway/package.nix +13 −11 Original line number Diff line number Diff line Loading @@ -3,18 +3,17 @@ buildGoModule, fetchFromGitHub, nixosTests, testers, prometheus-pushgateway, versionCheckHook, }: buildGoModule rec { buildGoModule (finalAttrs: { pname = "pushgateway"; version = "1.11.2"; src = fetchFromGitHub { owner = "prometheus"; repo = "pushgateway"; rev = "v${version}"; rev = "v${finalAttrs.version}"; sha256 = "sha256-Mc4yEd9CRfLZ4ZpcMnwQpoIXQpUerdxYD90FWRBzS20="; }; Loading @@ -23,25 +22,28 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X github.com/prometheus/common/version.Version=${version}" "-X github.com/prometheus/common/version.Revision=${version}" "-X github.com/prometheus/common/version.Branch=${version}" "-X github.com/prometheus/common/version.Version=${finalAttrs.version}" "-X github.com/prometheus/common/version.Revision=${finalAttrs.version}" "-X github.com/prometheus/common/version.Branch=${finalAttrs.version}" "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs" "-X github.com/prometheus/common/version.BuildDate=19700101-00:00:00" ]; passthru.tests = { inherit (nixosTests.prometheus) pushgateway; version = testers.testVersion { package = prometheus-pushgateway; }; }; nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; meta = with lib; { description = "Allows ephemeral and batch jobs to expose metrics to Prometheus"; mainProgram = "pushgateway"; homepage = "https://github.com/prometheus/pushgateway"; changelog = "https://github.com/prometheus/pushgateway/releases/tag/v${finalAttrs.version}"; license = licenses.asl20; maintainers = with maintainers; [ benley ]; }; } }) Loading
nixos/tests/prometheus/pushgateway.nix +3 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,9 @@ + "jq '.data.result[0].metric.version' | grep '\"${pkgs.prometheus-pushgateway.version}\"'" ) client.systemctl("start network-online.target") client.wait_for_unit("network-online.target") # Add a metric and check in Prometheus client.wait_until_succeeds( "echo 'some_metric 3.14' | curl --data-binary @- http://pushgateway:9091/metrics/job/some_job" Loading
pkgs/by-name/pr/prometheus-pushgateway/package.nix +13 −11 Original line number Diff line number Diff line Loading @@ -3,18 +3,17 @@ buildGoModule, fetchFromGitHub, nixosTests, testers, prometheus-pushgateway, versionCheckHook, }: buildGoModule rec { buildGoModule (finalAttrs: { pname = "pushgateway"; version = "1.11.2"; src = fetchFromGitHub { owner = "prometheus"; repo = "pushgateway"; rev = "v${version}"; rev = "v${finalAttrs.version}"; sha256 = "sha256-Mc4yEd9CRfLZ4ZpcMnwQpoIXQpUerdxYD90FWRBzS20="; }; Loading @@ -23,25 +22,28 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X github.com/prometheus/common/version.Version=${version}" "-X github.com/prometheus/common/version.Revision=${version}" "-X github.com/prometheus/common/version.Branch=${version}" "-X github.com/prometheus/common/version.Version=${finalAttrs.version}" "-X github.com/prometheus/common/version.Revision=${finalAttrs.version}" "-X github.com/prometheus/common/version.Branch=${finalAttrs.version}" "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs" "-X github.com/prometheus/common/version.BuildDate=19700101-00:00:00" ]; passthru.tests = { inherit (nixosTests.prometheus) pushgateway; version = testers.testVersion { package = prometheus-pushgateway; }; }; nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; meta = with lib; { description = "Allows ephemeral and batch jobs to expose metrics to Prometheus"; mainProgram = "pushgateway"; homepage = "https://github.com/prometheus/pushgateway"; changelog = "https://github.com/prometheus/pushgateway/releases/tag/v${finalAttrs.version}"; license = licenses.asl20; maintainers = with maintainers; [ benley ]; }; } })