diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-01-25 12:58:38 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-02-11 18:40:48 +0100 |
commit | 94d062da9a2040b2a424dd530a647d3827eb4989 (patch) | |
tree | bf04e03db48a1db327074f4797d26c5bef0e4136 /src/db/models/envvar.rs | |
parent | 2c4adce9fe8cef616ded756bb10b50e5ec782ecc (diff) |
Implement find-artifact subcommand
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>
Diffstat (limited to 'src/db/models/envvar.rs')
-rw-r--r-- | src/db/models/envvar.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db/models/envvar.rs b/src/db/models/envvar.rs index f334969..b5fcc4f 100644 --- a/src/db/models/envvar.rs +++ b/src/db/models/envvar.rs @@ -17,7 +17,7 @@ use crate::schema::envvars; use crate::schema::envvars::*; use crate::util::EnvironmentVariableName; -#[derive(Identifiable, Queryable)] +#[derive(Debug, Identifiable, Queryable)] #[table_name = "envvars"] pub struct EnvVar { pub id: i32, |