diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-05-23 10:56:13 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-06-05 09:12:46 +0200 |
commit | fb02409aea7168048d9afbc374c4db81c7f1aea7 (patch) | |
tree | 9fb9b9f3f03573436a2e2b92379b6fd47143e697 | |
parent | 25bb5af1aebd3e1f6f8a6a18805a94b8e23288bf (diff) |
build_unloaded()
-rw-r--r-- | mod/mod-ci-github.cxx | 20 | ||||
-rw-r--r-- | mod/mod-ci-github.hxx | 5 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index 7205e6e..1536e37 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -573,6 +573,26 @@ namespace brep return true; } + function<optional<string> (const tenant_service&)> ci_github:: + build_unloaded (tenant_service&& ts, + const diag_epilogue& log_writer) const noexcept + { + NOTIFICATION_DIAG (log_writer); + + service_data sd; + try + { + sd = service_data (*ts.data); + } + catch (const invalid_argument& e) + { + error << "failed to parse service data: " << e; + return nullptr; + } + + return nullptr; + } + // Build state change notifications (see tenant-services.hxx for // background). Mapping our state transitions to GitHub pose multiple // problems: diff --git a/mod/mod-ci-github.hxx b/mod/mod-ci-github.hxx index 8b2676b..8cd085d 100644 --- a/mod/mod-ci-github.hxx +++ b/mod/mod-ci-github.hxx @@ -19,6 +19,7 @@ namespace brep { class ci_github: public database_module, private ci_start, + public tenant_service_build_unloaded, public tenant_service_build_queued, public tenant_service_build_building, public tenant_service_build_built @@ -40,6 +41,10 @@ namespace brep cli_options () const {return options::ci_github::description ();} virtual function<optional<string> (const tenant_service&)> + build_unloaded (tenant_service&&, + const diag_epilogue& log_writer) const noexcept override; + + virtual function<optional<string> (const tenant_service&)> build_queued (const tenant_service&, const vector<build>&, optional<build_state> initial_state, |