From 623805cecd90a62089d3ec5dbe615c737231698a Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 27 Nov 2023 01:18:50 +0300 Subject: feat(ops/gerrit-autosubmit): init simple gerrit autosubmitter Adds a small Rust program that connects to the Gerrit API and uses a simple algorithm to figure out which changes should be submitted, and submits them: * it fetches all changes the Gerrit query API considers submittable (i.e. all requirements fulfilled), and that have the `Autosubmit` label set * it filters these changes down to those that are _actually_ submittable (in Gerrit API terms: that have an active Submit button) * it filters out those that would submit ancestors that are *not* marked with the `Autosubmit` label * it submits the longest chain After that it just loops. There is no rebasing logic yet for when it "runs out" of submittable changes, but it will not be difficult to add. Relates to b/333. Change-Id: Ib91ecf2c45b178e8c64ff7b2174d617d4c45efe2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10131 Tested-by: BuildkiteCI Reviewed-by: sterni Reviewed-by: ezemtsov Autosubmit: tazjin --- ops/gerrit-autosubmit/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 ops/gerrit-autosubmit/default.nix (limited to 'ops/gerrit-autosubmit/default.nix') diff --git a/ops/gerrit-autosubmit/default.nix b/ops/gerrit-autosubmit/default.nix new file mode 100644 index 000000000000..f69a9248e351 --- /dev/null +++ b/ops/gerrit-autosubmit/default.nix @@ -0,0 +1,7 @@ +{ depot, pkgs, ... }: + +depot.third_party.naersk.buildPackage { + src = ./.; + nativeBuildInputs = [ pkgs.pkg-config ]; + buildInputs = [ pkgs.openssl ]; +} -- cgit 1.4.1