diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-02-15 16:47:21 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-02-15 16:47:21 +0100 |
commit | 48317703c85ed55c4757aa6a966b7c5f5cdd1d14 (patch) | |
tree | 563bb089180ca2558bfc2fe0d5a1a2f4c9f650dc /src/orchestrator/orchestrator.rs | |
parent | 581d2ac49137142672cfd5efb4745847683736b9 (diff) |
Fix: Pass additional environment from job definition when searching for replacement artifacts
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/orchestrator/orchestrator.rs')
-rw-r--r-- | src/orchestrator/orchestrator.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index bb41181..f9ee86f 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -506,7 +506,17 @@ impl<'a> JobTask<'a> { { let release_store = self.merged_stores.release().read().await; let staging_store = self.merged_stores.staging().read().await; - let additional_env = vec![]; + + // Use the environment of the job definition, as it appears in the job DAG. + // + // This is because we do not have access to the commandline-passed (additional) + // environment variables at this point. But using the JobResource::env() variables + // works as well. + let additional_env = self.jobdef.job.resources() + .iter() + .filter_map(crate::job::JobResource::env) + .map(|(k, v)| (k.clone(), v.clone())) + .collect::<Vec<_>>(); let replacement_artifacts = crate::db::find_artifacts( self.database.clone(), |