summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2021-03-17Make error on closed channel more verboseMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-17Add check whether package name or version is emptyMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-17Merge branch 'update-deps'Matthias Beyer
2021-03-16Fix: Check return value of confirmation promptMatthias Beyer
This is an embarrassing bug. :-/ Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-13Switch from sha1 to sha-1Matthias Beyer
This is because the "sha1" crate seems to be unmaintained (no release in 3 years) but the sha-1 crate seems to be actively maintained in the context of a bigger rust-crypto-functions project. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Tested-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-11Fix: Make XDG configuration not requiredMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Merge branch 'misc'Matthias Beyer
2021-03-11Add more error context to config loadingMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Endpoint configuration as MapMatthias Beyer
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>
2021-03-11Add xdg-based config file mergingMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more verbose error if ./. is not a git repositoryMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Fix: Make error message more readable for humansMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add missing about message for release subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more verbose error output if no subcommand is givenMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more verbose error output if no subcommand is givenMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more error context if CLI command failsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more error contextMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Fix: Remove job input/output artifacts tablesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Fixes: b95c3f21a2a9406d45a0e421a11f6425291f1182 ("Remove job input/output artifacts tables")
2021-03-10Merge branch 'pathes-to-absolute'Matthias Beyer
2021-03-10Fix: Do not check lint script path in config validationMatthias Beyer
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>
2021-03-10Merge branch 'subcommand-endpoint'Matthias Beyer
Conflicts: src/cli.rs src/main.rs from merging the "metrics" subcommand implementation branch first. Conflicts were trivial, so I resolved them here in the merge commit. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-10Add comments on patch-path-fixing algorithmMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Refactor for more readabilityMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Re-write patch postprocessingMatthias Beyer
This patch rewrites patch post-processing with a new setter in the config-rs crate: Config::set_once() That is introduced on a PR I've written for the crate. The PR: https://github.com/mehcode/config-rs/pull/172 The new function is more likely to land on the config-rs master branch than the old one, as it does not introduce more exported types from the config-rs crate. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Implement patch-to-container copyingMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Add command to get metricsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-10Clippy fix: Remove unneeded lifetimesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Clippy fix: Remove unneeded to_string() callMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Add subcommand: container inspectMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Add long_about for container exec subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Refactor: Simplify impl of Endpoint::get_container_by_id()Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-09Implement patch-path rewritingMatthias Beyer
This patch ensures that pathes for patches are always relative to the repository root, when loading the packages layered from the repository. The problem is well described in the comment in the code, so this commit message ends here. This patch was written using an proposed feature for the config-rs dependency: https://github.com/mehcode/config-rs/pull/165 This PR added a `Config::get_value_mut()` function and exported the `config::value::ValueKind` type in config-rs public API. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-08Refactor filter building into helper functionMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-08Add "containers prune" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Reimplement container subcommands with less boilerplateMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Move container subcommand to own fileMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Implement container exec subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Implement container stop subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Implement container start subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Implement container delete subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Add container kill subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Add container CLI interfaceMatthias Beyer
This patch starts the implementation of a CLI interface to work with a single container from one endpoint. The "top" functionality is implemented by now, nothing more. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add Endpoint::get_container_by_id()Matthias Beyer
This function returns a shiplift::Container rather than an own type, which is more convenient at this point, but might be rewritten if we provide more endpoints (something else than docker). Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add Endpoint::has_container_with_id()Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Fix: Do not print table if there is no dataMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add filters for listing containers on endpointsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add subcommand "endpoint container list" for listing containersMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add Endpoint::container_stats() with helper typesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Outsource connecting to endpointsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Use the bytesize crate to format size of memory nicelyMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>