Age | Commit message (Collapse) | Author |
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch refactors the database connection setup code to involve less copying
of data in memory.
It also changes the configuration value type of the database port and the
database connection timeout setting to be `u16` instead of `String`, which is
another improvement.
Because the `DbConnectionConfig` type no longer holds owned values, it must be
annotated with a lifetime. Usages were adapted.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch adds support for a database connection timeout, giving the user the
option to configure one, but hardcoding a default timeout to 30 seconds.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch adds a configurable timeout value (default 10 seconds)
in the Endpoint struct.
This way we get an error if the connection to the endpoint is stalled.
Signed-off-by: Christoph Prokop <christoph.prokop@atos.net>
Pair-programmed-with: Matthias Beyer <matthias.beyer@atos.net>
Suggested-by: Matthias Beyer <matthias.beyer@atos.net>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch rewrites the endpoint configuration format to be a map.
The problem here is, that a list of endpoints cannot easily be used with layered
configuration, where a part of the configuration lives in the XDG config home of
the user and the rest lives in the repository.
With this patch, the endpoints are configured with a map instead of an array,
which makes it less complicated to overwrite.
The name of an endpoint is now the key in the map.
A type `EndpointName` was introduced to take advantage of strong typing. Thus,
the patch touches a bit more code to adapt to the new type in use.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Tested-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This fix is needed because the config validation does not know whether the
config is loaded from ./ or from ../ (or way more up).
The script linter path points to a file relative to the project root, which
cannot be checked here, but only when constructing the linter command.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch removes the "speed" setting from the configuration, which was
introduced to set a relative speed for each endpoint, with the idea that the
scheduler then would select a faster node preferably.
Instead, the utilization of an endpoint is now calculated (number of running
jobs vs allowed maximum jobs on the endpoint), and the endpoint with lower
utilization is selected.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch implements the feature to be able to pass author and commit hash
information from the repository to the container.
This can be used to set packager or package description commit hash inside the
build container, if desired.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch adds the ability to set network mode for an endpoint. This means that
all containers on the endpoint are started with, for example, --net=host (if
that is desired).
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Tested-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch adds a compatibility setting in the configuration file, so that
butido does not fail late when parsing configuration parameters or package
definition files, but early, when the configured compatilibty does not match the
version of butido itself.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This is the right scope anyways.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch adds the "allowlist" feature for packages.
A package can have a list of allowed images to be built on - butido will
not execute the submit if one package is not allowed on the image
passed to butido.
This is the opposite of the denylist, of course.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch adds script linting via a configurable script.
With this patch, the configuration can point to a script or program that
gets the packaging script on STDIN and might exit with a nonzero value
on error.
The simplest script I can think of that adds value is:
#!/bin/bash
shellcheck -
to run the packaging script through shellcheck.
stdout and stderr of the linting script are printed in case of non-zero
return value.
Linting can be disabled by not setting the script in the config or by
passing a commandline flag to skip linting (a warning will be printed in
this case).
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch adds more verbose error reporting in case of build error.
It alters the Orchestrator::run() interface to return the Job UUID
alongside the error object.
The UUID object can then be (and is) used in the "build" subcommand
implementation to fetch information about the failed job from the
database and print it to the user.
The number of log lines is configurable.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
requested
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch implements the shebang overwriting functionality that was in
a TODO note.
It adds a `Shebang` type for it, which is a String wrapper.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch adds strict script interpolation, which means that the script
interpolation will result in an error if a variable is referenced that
does not exist.
Before this patch, referencing an absent variable did result in an empty
string, possibly resulting in an error at runtime.
This feature is on by default.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This was unused anyways, and I am not even sure what we implemented it
for.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Because we want to be able to work on different distros, we cannot have
a concept of "system dependencies", because each distro names their
packages differently.
The concept of installing stuff from a distro image can still be
accomplished easily via environment variables.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch implements multiple (unnamed) sources per package.
This means that a package can have an array of sources.
What was adapted to allow multiple sources per package:
* Downloads are made in parallel now
* The cache structure was changed to /<package>-<version>/<hash>.source
* The UI was changed to contain the full `Package` struct (as JSON
object) in a UI format string
Tests were adapted.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
We don't actually want to pass a print format as complex as the package
list format on the CLI.
Thus, move it to the configuration file.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
interpolation
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|