summaryrefslogtreecommitdiffstats
path: root/crates/driver/src/driver.rs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-11-01 23:20:49 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-11-01 23:33:45 +0100
commit3123a16b6793a209aa10b4e72b63729ae9a32e99 (patch)
treec22afe45db2e2091fb19e723a046a3fe2ee3c024 /crates/driver/src/driver.rs
parentf6e4529dba0adbf1736687686a0d70e674830a21 (diff)
downloadrebel-3123a16b6793a209aa10b4e72b63729ae9a32e99.tar
rebel-3123a16b6793a209aa10b4e72b63729ae9a32e99.zip
runner: use rootfs passed in Task definition
With this, the rootfs hash is included in the task's input hash, so now the hash covers all significant inputs except for the runner itself.
Diffstat (limited to 'crates/driver/src/driver.rs')
-rw-r--r--crates/driver/src/driver.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/driver/src/driver.rs b/crates/driver/src/driver.rs
index e3dc407..84262ac 100644
--- a/crates/driver/src/driver.rs
+++ b/crates/driver/src/driver.rs
@@ -298,14 +298,16 @@ impl<'ctx> Driver<'ctx> {
format!("Failed to evaluate command template for task {}", task_ref)
})?;
+ let rootfs = self.state.ctx.get_rootfs();
let task = Task {
label: format!("{:#}", task_ref),
command,
workdir: paths::TASK_WORKDIR.to_string(),
+ rootfs: rootfs.0,
inherit: inherit_chain,
depends: task_deps,
outputs: task_output,
- pins: HashMap::new(),
+ pins: HashMap::from([rootfs.clone()]),
};
Ok(Some(runner.spawn(&task)))