summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-05-31 11:55:48 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-05-31 11:55:48 +0200
commitccf323bb0812638ca551f88e0adc71e166ea979f (patch)
tree924604e484f2281932f79b6e2a5c91fa8d525485
parentfb162232e0c093afc76210ce2bdcde03aa8fd9b0 (diff)
downloadbutido-ccf323bb0812638ca551f88e0adc71e166ea979f.tar.gz
butido-ccf323bb0812638ca551f88e0adc71e166ea979f.tar.xz
Fix: git commit hash/author information passing
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>
-rw-r--r--src/orchestrator/orchestrator.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs
index b118ed1..dd1322d 100644
--- a/src/orchestrator/orchestrator.rs
+++ b/src/orchestrator/orchestrator.rs
@@ -571,6 +571,8 @@ impl<'a> JobTask<'a> {
.iter()
.filter_map(crate::job::JobResource::env)
.map(|(k, v)| (k.clone(), v.clone()))
+ .chain(self.git_author_env.cloned().into_iter())
+ .chain(self.git_commit_env.cloned().into_iter())
.collect::<Vec<_>>();
let replacement_artifacts = crate::db::find_artifacts(