From b3633d94b0ec44575c7bbc0a741bf0e388beba72 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 29 Oct 2019 18:39:34 +0300 Subject: Add support for environment task manifest value --- libbbot/manifest.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libbbot/manifest.cxx') diff --git a/libbbot/manifest.cxx b/libbbot/manifest.cxx index a815f39..aa9d508 100644 --- a/libbbot/manifest.cxx +++ b/libbbot/manifest.cxx @@ -546,6 +546,16 @@ namespace bbot bad_value (string ("invalid task target: ") + e.what ()); } } + else if (n == "environment") + { + if (environment) + bad_name ("task environment redefinition"); + + if (v.empty ()) + bad_value ("empty task environment"); + + environment = move (v); + } else if (n == "config") { if (!config.empty ()) @@ -634,6 +644,9 @@ namespace bbot s.next ("machine", machine); s.next ("target", target.string ()); + if (environment) + s.next ("environment", *environment); + // Serialize an optional value of the strings type as a space-separated // string list. // -- cgit v1.1