From c8ace1ee0a6cab5fd4ea2f084ea436cfa513637d Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 13 Jul 2017 22:50:15 +0300 Subject: Make use of wildcards in buildfiles --- bbot/agent/agent.cli | 232 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 bbot/agent/agent.cli (limited to 'bbot/agent/agent.cli') diff --git a/bbot/agent/agent.cli b/bbot/agent/agent.cli new file mode 100644 index 0000000..a5dbe01 --- /dev/null +++ b/bbot/agent/agent.cli @@ -0,0 +1,232 @@ +// file : bbot/agent.cli +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : TBC; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bbot-agent" +"\summary=build bot agent" + +namespace bbot +{ + { + " ", + + " + \h|SYNOPSIS| + + \cb{bbot-agent --help}\n + \cb{bbot-agent --version}\n + \c{\b{bbot-agent} [] ...} + + \h|DESCRIPTION| + + \cb{bbot-agent} @@ TODO. + + Note that on termination \cb{bbot-agent} may leave a working machine + snapshot behind. It is expected that the caller (normally Build OS + monitor) cleans them up before restarting the agent. + " + } + + class agent_options + { + "\h|OPTIONS|" + + bool --help {"Print usage information and exit."} + bool --version {"Print version and exit."} + + bool --systemd-daemon + { + "Run as a simple systemd daemon." + } + + path --auth-key + { + "", + "Private key for the public key-based agent authentication. If not + specified, then the agent will not be able to request tasks from + controllers that require authentication. + + The file is expected to contain a single PEM-encoded private key + without a password. A suitable key can be generated using the + following command: + + \ + $ openssl genrsa 4096 >key.pem + \ + " + } + + path --openssl = "openssl" + { + "", + "The openssl program to be used for crypto operations. You can also + specify additional options that should be passed to the openssl program + with \cb{--openssl-option}. If the openssl program is not explicitly + specified, then \cb{bbot-agent} will use \cb{openssl} by default." + } + + strings --openssl-option + { + "", + "Additional option to be passed to the openssl program (see + \cb{--openssl} for details). Repeat this option to specify multiple + openssl options." + } + + size_t --cpu = 1 + { + "", + "Number of CPUs (threads) to use, 1 by default." + } + + size_t --ram (1024 * 1024) // 1G + { + "", + "Amount of RAM (in kB) to use, 1G by default." + } + + string --toolchain-name = "default" + { + "", + "Toolchain name, \cb{default} by default." + } + + uint16_t --toolchain-num = 1 + { + "", + "Toolchain number, 1 by default." + } + + standard_version --toolchain-ver + { + "", + "Toolchain version. If unspecified, then the agent's version will be + used (which will be imprecise for snapshot versions)." + } + + string --toolchain-id + { + "", + "Toolchain id. If unspecified or empty, then no re-bootstrapping on + toolchain changes will be performed (which is primarily useful for + testing)." + } + + strings --trust + { + "", + "Trust repository certificate with a SHA256 ." + } + + dir_path --machines = "/build/machines/" + { + "", + "The location of the build machines, \cb{/build/machines/} by default." + } + + dir_path --tftp = "/build/tftp/" + { + "", + "The location of the TFTP server root, \cb{/build/tftp/} by default." + } + + uint16_t --tftp-port = 23400 + { + "", + "TFTP server port base, 23400 by default. The actual port is calculated + by adding the toolchain number \c{--toolchain-num} to this value." + } + + size_t --bootstrap-timeout = 900 + { + "", + "Maximum number of seconds to wait for machine bootstrap completion, + 900 (15 minutes) by default." + } + + size_t --bootstrap-retries = 2 + { + "", + "Number of time to retry a mis-booted bootstrap, 2 by default." + } + + size_t --build-timeout = 1800 + { + "", + "Maximum number of seconds to wait for build completion, 1800 (30 + minutes) by default." + } + + size_t --build-retries = 2 + { + "", + "Number of time to retry a mis-booted build, 2 by default." + } + + size_t --request-timeout = 300 + { + "", + "Maximum number of seconds to wait for controller request completion, + 300 (5 minutes) by default." + } + + uint16_t --verbose = 1 + { + "", + "Set the diagnostics verbosity to between 0 and 6 with level 1 + being the default." + } + + // Testing options. + // + bool --dump-machines + { + "Dump the available machines to \cb{stdout}, (re)-bootstrapping any if + necessary, and exit." + } + + bool --dump-task + { + "Dump the received build task to \cb{stdout} and exit." + } + + bool --dump-result + { + "Dump the obtained build result to \cb{stdout} and exit." + } + + bool --fake-bootstrap + { + "Fake the machine bootstrap process by creating the expected bootstrapped + machine manifest." + } + + bool --fake-build + { + "Fake the package building process by creating the aborted build result." + } + + path --fake-machine + { + "", + "Fake the machine enumeration process by reading the machine header + manifest from (or \cb{stdin} if is '\cb{-}')." + } + + path --fake-request + { + "", + "Fake the task request process by reading the task manifest from + (or \cb{stdin} if is '\cb{-}')." + } + }; + + " + \h|EXIT STATUS| + + Non-zero exit status is returned in case of an error. + " +} -- cgit v1.1