aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-repository-root.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-05-26 13:46:55 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-05-28 13:58:46 +0300
commita7ae434c48c14bfde46a871455a3aa2ac0b81376 (patch)
tree2d4f66a2e153842e166becfcbb2a820036faffcb /mod/mod-repository-root.cxx
parent5e631e5f63fdc8528d5d178d6a66dfb32a2c0f8b (diff)
Add CI cancel handler
Diffstat (limited to 'mod/mod-repository-root.cxx')
-rw-r--r--mod/mod-repository-root.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/mod/mod-repository-root.cxx b/mod/mod-repository-root.cxx
index 34b4007..bc861a8 100644
--- a/mod/mod-repository-root.cxx
+++ b/mod/mod-repository-root.cxx
@@ -133,6 +133,7 @@ namespace brep
#else
ci_ (make_shared<ci> ()),
#endif
+ ci_cancel_ (make_shared<ci_cancel> ()),
upload_ (make_shared<upload> ())
{
}
@@ -201,6 +202,10 @@ namespace brep
#else
: make_shared<ci> (*r.ci_)),
#endif
+ ci_cancel_ (
+ r.initialized_
+ ? r.ci_cancel_
+ : make_shared<ci_cancel> (*r.ci_cancel_)),
upload_ (
r.initialized_
? r.upload_
@@ -231,6 +236,7 @@ namespace brep
append (r, build_configs_->options ());
append (r, submit_->options ());
append (r, ci_->options ());
+ append (r, ci_cancel_->options ());
append (r, upload_->options ());
return r;
}
@@ -277,6 +283,7 @@ namespace brep
sub_init (*build_configs_, "build_configs");
sub_init (*submit_, "submit");
sub_init (*ci_, "ci");
+ sub_init (*ci_cancel_, "ci-cancel");
sub_init (*upload_, "upload");
// Parse own configuration options.
@@ -473,6 +480,13 @@ namespace brep
return handle ("ci", param);
}
+ else if (func == "ci-cancel")
+ {
+ if (handler_ == nullptr)
+ handler_.reset (new ci_cancel (*ci_cancel_));
+
+ return handle ("ci-cancel", param);
+ }
else if (func == "upload")
{
if (handler_ == nullptr)