summaryrefslogtreecommitdiffstats
path: root/src/main.rs
AgeCommit message (Collapse)Author
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-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-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-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 command to get metricsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Add subcommand "endpoint <ENDPOINT> ping"Matthias Beyer
This is the first "endpoint" subcommand implementation, which adds a "ping" subcommand, that can be used to ping all endpoints. This is the first step towards a CLI interface for endpoint maintenance commands. "ping" is the least complex one to implement and the docker crate ("shiplift") offers that functionality where one can ping the docker endpoints for availability, thus this is chosen as first implementation. Later, container cleanup and so on will be added as well, based on this work. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-04Remove counting of package filesMatthias Beyer
This removes the counting of package files and using that value to set the length of the progress bar. This was just overhead and because of the duration of the bars to be visible (very short) simply not necessary. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-02-24Move constants to dedicated moduleMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-02-15Force "funty" to 1.1.0Matthias Beyer
This forces the transitive dependency of "bitvec", named "funty", to 1.1.0. Rationale: https://github.com/bitvecto-rs/bitvec/issues/105#issuecomment-778570981 Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-02-11Implement find-artifact subcommandMatthias Beyer
This patch implements the find-artifact subcommand, which is the basis for artifact finding. Right now we have the problem that finding artifacts after the fact is non-trivial. What we can do, though, is search for them in the database using the same inputs as the ones that created the artifact. That means that if we want to find an artifact or multiple artifacts for a package P in version V, we have to search the database for jobs that built that package in that version, with the same script and the same variables (environment, used container image, etc). So if a package was built with the same script, the same environment variables and on an image that is, for example, not in the denylist of the package, chances are good that the artifacts produced by the job for the package are the ones we search for. In the `crate::command::find_artifact()` function, results are sorted before they are printed, so that we preferrably print results with a release date. Env filtering is also implemented, so a user has to provide the appropriate additional environment variables, as they were submitted for the `buid` command when the artifact was built. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-02-11Remove unnecessary return typeMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-29Add documentation how Orchestrator worksMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-25Do not deny missing docs, we havent written em yetMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-25Do not deny missing copy impls, we have to manyMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-25Do not deny missing debug impls, we have to manyMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-25Do not deny unused results, we have too manyMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-25Fix: Use rand as _ to make lint happyMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-25Deny more things, sort denylistMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-20Move the cleanness check to the "build" command implementationMatthias Beyer
All other subcommands should be able to run on an unclean repository, but the build command should not. Thus, move this function call from main() to the build() implementation. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-18Run `cargo fmt`Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-15Fix clippy: this `else { if .. }` block can be collapsedMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-15Fix clippy: useless lint attributeMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-13Add LICENSE file and license headersMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-15Add subcommand to generate CLI completion scriptMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-14Refactor: Move phase module to packageMatthias Beyer
This is the right scope anyways. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-11Add "tree-of" subcommand to print dependency tree of a packageMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-11Refactor to find linter from repository rootMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-11Add "lint" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-09Fix weird rendering bug of progress barsMatthias Beyer
Apparently, this fixes the rendering bug we had with indicatif. The issue was, that we called `indicatif::ProgressBar::set_message()` before the bar was added to the `indicatif::MultiProgress` object. This caused the bar to be rendered, and as soon we added it to the MultiProgress object and re-called set_message(), it was rendered again. This is of course a bug / inconveniance in indicatif. Either way, the issue was solved by not calling `set_message()` in our `ProgressBars` helper object, but only return a preconfigured bar object. Because not calling the set_message() function yields the whole bunch of helper functions as unnecessary, these were removed and the interface was boiled down to `pub fn ProgressBars::bar(&self) -> indicatif::ProgressBar` which in turn results in a few modifications all over the place. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-09Make ProgressBars helper able to create spinnersMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Deny trivial numeric castsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Deny macro_use from external crateMatthias Beyer
Diesel is an exception here, because the generated src/schema.rs file does not automatically contain the necessary imports. All imports were added where necessary. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Add list of denied lintsMatthias Beyer
Enable only some of them, for starters. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Remove unused variableMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-03Implement release subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-26Update dependency: clap: 3.0.0-beta.1 -> 3.0.0-beta.2Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-26Load config file path from repository root instead cwdMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-26Fix: Repo path should be cwd, not configurableMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-13Add flag to show script, highlighted automaticallyMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-11Add subcommand "source download"Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-11Move to have "source" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-11Add command: verify-sourcesMatthias Beyer
This adds a command to hash-check all sources. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-11Add source cache typesMatthias Beyer
This adds a module for source cache handling. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-10Move DB cli interface to proper placeMatthias Beyer
This moves the DB CLI interface building code to src/cli.rs and the interface handling code to src/commands/db.rs Signed-off-by: Matthias Beyer <mail@beyermatthias.de>