From 19c8efe49f23569a53e928488c460e0d3b20cf8a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 16 May 2024 14:20:39 +0200 Subject: Sketch --- mod/ci-common.hxx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'mod/ci-common.hxx') diff --git a/mod/ci-common.hxx b/mod/ci-common.hxx index 6f62c4b..047faa1 100644 --- a/mod/ci-common.hxx +++ b/mod/ci-common.hxx @@ -36,6 +36,7 @@ namespace brep package_name name; optional version; }; + // Note that the inability to generate the reference is an internal // error. Thus, it is not optional. // @@ -64,6 +65,39 @@ namespace brep const vector>& custom_request = {}, const vector>& overrides = {}); + // Create an unloaded CI request returning start_result::reference. Such a + // request is not started until loaded with the load() function below. See + // also the build_unloaded() tenant services notification. + // + string + create (const basic_mark& error, + const basic_mark& warn, + const basic_mark* trace, + tenant_service&&, + const optional& client_ip, + const optional& user_agent); + + // Load (and start) previously created (as unloaded) CI request. + // + // Note that tenant_service::id is used to identify the CI request tenant. + // + // @@ What if already loaded/abandoned? Can we indicate this in status? + // + optional + load (const basic_mark& error, + const basic_mark& warn, + const basic_mark* trace, + tenant_service&&, + const repository_location& repository); + + // Abandon previously created (as unloaded) CI request. + // + void + abandon (const basic_mark& error, + const basic_mark& warn, + const basic_mark* trace, + tenant_service&&); + // Helpers. // -- cgit v1.1