Age | Commit message (Collapse) | Author |
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Because the scripts we run should not be able to access the logger
during handlbars rendering.
This is due to the fact that we need to have control over stdout/stderr
because of the progress bar printing, but also because there's
absolutely no need for the user to log during the handlebars rendering
process.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This adds two script helpers to join lists of strings.
They do not support arrays.
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>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This removes the ContainerError type for simplicity. We can call
anyhow!() and just work with that, no need to pull in thiserror just for
one type.
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>
|
|
I guess it only worked because pom uses some kind of prefix-matching
algorithm. It shouldn't have worked this way, IMO.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Sort and make indention nice.
Also dev-dependencies where removed because indoc is a normal dependency
anyways.
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>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
Fixes: 1d038bae2b ("Remove feature: State message in "OK" case.")
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch fixes an error where a failing
(as in {{stage "ERR" "something"}}) job was not written to the database.
The implementation and signatore of Endpoint::run_job() had to be
altered for that, see code comment.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This changes the Orchestrator interface to return a Vec of errors which
happened during the container run, rather than just reporting "something
errored".
This way, we can use the build subcommand implementation to do the
reporting instead of the Orchestrator implementation, which is way
cleaner (especially for future features).
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Some changes for better error reporting.
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
The "OK" case had a state message parameter. This was removed because
"OK" does mean that everything went well. No need to have a message
here.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch rewrites the container error reporting to be more simple.
The ContainerError type was rewritten to not wrap other errors anymore,
but be the root error itself.
It only has one variant now, because there's only one kind of error: "It
didn't work".
The reporting in the calling functions can now use anyhow::Result<_>
instead of std::result::Result because of that.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch fixes a behaviour where non-package files were not ignored,
which resulted in error messages where a directory was tried to parse
(which of course is not valid).
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch moves the script formatting to the definition of the Script
type, where it belongs to.
This is not an optimal implementation code-cleanness wise, because we
could always improve the interface to be even more typesafe and
convenient to use, but I guess this is nice for now.
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 an example package repository including a "source
repository" where sources for packages are located.
The Makefile can be used to setup an testing environment, controlled via
environment settings (which are created via shell.nix for example) and
spin up a webserver for the sources.
Butido can then be used to download and build the sources into packages.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This environment is default selected.
With
nix-shell ./shell.nix --argstr example 1
it can be selected explicitely.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|