summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-06-15Debug-Print all package details before renderingtry-update-handlebarsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-15Add more debug information for Package typeMatthias Beyer
This patch adds a possibility to print the Package object with more detailed information. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-15Update dependency: handlebars: 3 -> 4Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-09Revert "Fix: Make patch path absolute"Matthias Beyer
This fix was actually buggy. The problem here is that the `Package` struct is used to fill variables in the script. If we overwrite the patch pathes with their absolute variant, the script gets interpolated with the absolute paths, resulting in things like patch -p0 < /patches//home/user/package_repository/software/p.patch but the copy-to-container process copies (should copy) the patch file to /patches/software/p.patch This reverts commit dcc8b42810d34b2b906f0307c26c4826d16ad997. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-09Use constant for patch destination prefixMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-09Merge branch 'error-output'Matthias Beyer
2021-06-09Add more error contextMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-09Add error contextMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-09Remove too verbose trace outputMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-09Merge branch 'config-only-toml'Matthias Beyer
2021-06-09Revert "Update dependency: handlebars: 3 -> 4"Matthias Beyer
Because the update broke interpolation of the "patches" variable from the package definitions (and possibly others), we revert the update for now until we figured out what is actually wrong here. This reverts commit 3cb481417b13c5664bb4157d932b8ad4df5cb66d. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-09The config crate should only support toml as backendMatthias Beyer
This should reduce our dependencies by a certain number. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-06-08Fix: Do not fail if directory existsMatthias Beyer
butido should not fail if the source cache directory already exists (which is the case when downloading two source files for one package). Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-08Insert-and-get should be executed as transactionMatthias Beyer
This patch makes sure all database functions are executed as transactions, so that we do not accidentially end up in a data race if two butido instances are executing these functions at the same time. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-08Merge branch 'update-dependencies'Matthias Beyer
2021-06-08Update dependency: semver: 0.11 -> 1.0Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-08Update dependency: parse-display: 0.4 -> 0.5Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-08Update dependency: handlebars: 3 -> 4Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Merge branch 'release-filtering'Matthias Beyer
2021-06-07Add flag to filter releases by packageMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Revert "Add support for filtering releases by package name and version"Matthias Beyer
Filtering the releases from the database should not be done via a regex in the application code. Rationale is that filtering with a regex is only wanted if the user _searches_ for something. In this instance, the user is expected to know already what they want to see, so this is not a _search_, but a _filtering_. Hence, we rather implement the filtering via an appropriate database query instead of loading all releases and then filtering by regex. This reverts commit b665c7cd4aa4ea900dc194a6ba5ad9de527f978c. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Add flag to filter releases by storeMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Merge branch 'db-jobs-flags'Matthias Beyer
2021-06-07Add package filtering for "db jobs" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Add endpoint filtering in "db jobs" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Add date-filtering to "db jobs" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Refactor: Simplify query buildingMatthias Beyer
Simplify query building by making `sel` variable `mut` and not reassigning it in else cases. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Capitalize table headingsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Remove database IDs from outputMatthias Beyer
The database IDs are an implementation detail and the user does not need to see them in any case. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-07Merge branch 'db-release-arg-date-filter'Matthias Beyer
2021-06-07Fix: Make patch path absoluteMatthias Beyer
This patch changes the patch-path collecting to make the pathes to patches absolute. This fixes a bug where executing butido from a sub directory of the package repository failed to find the patch files when loading the repository files. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Fix: Wrong wording in metrics outputMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Add support for filtering releases by package name and versionMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Remove conflict between newer-than and older-than argumentMatthias Beyer
So they can be specified both. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Try to parse time with " 00:00:00" appendedMatthias Beyer
This makes it a bit easier to only specify a date. If the parsing fails (e.g. with "2020-01-01"), this patch adds another step of parsing by adding " 00:00:00" to the commandline argument and trying again to parse. This way, the CLI argument can be "2020-01-01" and the time does not have to be specified. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Subcommand "db releases" add date filterMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Add ability to specify point in time in date filter argumentMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Refactor: move get_date_filter() helper fn to commands:util moduleMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Fix: code styleMatthias Beyer
Fixes: 52bd280b4b95949cf130e4d7477c02ad2d2f81b3 ("Refactor: Database connection setup code") Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Fix: About string should be settable for argument generator helper fnMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-01Update changelog for the 0.1.4 releaseMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> (cherry picked from commit 4e3dccc9290056c91d120cfa8cf74330b0a7d65d)
2021-06-01Remove sourcehut buildsMatthias Beyer
Since today, sourcehut builds should only work if payment is enabled. Right now it still seems to work. I am not sure whether this is a bug or intended. Either way, to be nice, remove the build setup for now until we figured out what is happening and how to continue. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-31Fix: git commit hash/author information passingMatthias Beyer
This fixes the git commit hash and author information passing. The changes in 2d72cbed2495517dba84ec4d46e5f521ff46412b did not add the environment variables to the `find_artifact()` call when searching for replacement artifacts. Thus, calling the same build twice, with the staging directory from the first call added in the second call, resulted in a full rebuild, although the artifacts from the first call could be resused. With this patch applied, this issue is fixed by adding the environment variables to the environment passed to the `find_artifacts()` call. Fixes: 2d72cbed2495517dba84ec4d46e5f521ff46412b ("Add feature to pass git author and git commit information to container") Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-31Merge branch 'fix-color-log-in-db'Matthias Beyer
2021-05-31Fix: Insert shouldn't be done with LogItem::display()Matthias Beyer
This fixes a nasty bug; because we used the LogItem::display() function to build the log string that was put into the database, the database contained _colorized_ log lines. Because of this, our parsing of the log text later (when reading historical data from the database) failed to parse whether the job was successfull or not. The issue was actually introduced in b3a6458ce34e3065192208826b2fc85edd4761f9, where we changed the `LogItem::display()` implementation. With this fix in place, the log text in the database is corrected again (only for new logs that get put into the database). Fixes: b3a6458ce34e3065192208826b2fc85edd4761f9 ("Add color support in LogItem::display() impl") Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-31Fix typoMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-31Add trace outputMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-31Impl Debug for ParsedLogMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-31Add another successfullness test for log parserMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-31Make job-successfullness-check less boolishMatthias Beyer
This patch changes the interface from `-> Option<bool>` to something more explanatory. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>