summaryrefslogtreecommitdiffstats
path: root/src/orchestrator/orchestrator.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-08-30 12:55:57 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-09-06 11:15:06 +0200
commit0bf1c985dcad30db4efcd9307df2b9ec23184ea5 (patch)
tree6a022100722f63e1b5c629065e717eb6f21b5458 /src/orchestrator/orchestrator.rs
parent910af91c2eb5d58b9fdf0317ba086c4ed687d690 (diff)
Rewrite interface for finding artifacts with builder
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/orchestrator/orchestrator.rs')
-rw-r--r--src/orchestrator/orchestrator.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs
index fc15494..f4644da 100644
--- a/src/orchestrator/orchestrator.rs
+++ b/src/orchestrator/orchestrator.rs
@@ -640,11 +640,11 @@ impl<'a> JobTask<'a> {
.chain(self.git_commit_env.cloned().into_iter())
.collect::<Vec<_>>();
- let replacement_artifacts = crate::db::find_artifacts(
- self.database.clone(),
- self.config,
- self.jobdef.job.package(),
- &self.release_stores,
+ let replacement_artifacts = crate::db::FindArtifacts::builder()
+ .database_connection(self.database.clone())
+ .config(self.config)
+ .package(self.jobdef.job.package())
+ .release_stores(&self.release_stores)
// We can simply pass the staging store here, because it doesn't hurt. There are
// two scenarios:
@@ -659,10 +659,11 @@ impl<'a> JobTask<'a> {
// The fact that released artifacts are returned prefferably from this function
// call does not change anything, because if there is an artifact that's a released
// one that matches this job, we should use it anyways.
- Some(&staging_store),
- &additional_env,
- true
- )?;
+ .staging_store(Some(&staging_store))
+ .env_filter(&additional_env)
+ .script_filter(true)
+ .build()
+ .run()?;
debug!("[{}]: Found {} replacement artifacts", self.jobdef.job.uuid(), replacement_artifacts.len());
trace!("[{}]: Found replacement artifacts: {:?}", self.jobdef.job.uuid(), replacement_artifacts);