commit 4ba70051b24eb0cf71f3d57f66a1c604d7d1125d Author: Nicolas Vigier boklm@torproject.org Date: Tue Apr 25 22:17:17 2017 +0200
Give access to input files in remote_start --- doc/rbm_remote.asc | 4 +++- lib/RBM.pm | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/doc/rbm_remote.asc b/doc/rbm_remote.asc index 8888696..479062a 100644 --- a/doc/rbm_remote.asc +++ b/doc/rbm_remote.asc @@ -44,7 +44,9 @@ remote_get:: remote_start:: the template of a command that will start the remote host before we can access it. This can be useful for instance if you need - to start a VM, or fetch a container. + to start a VM, or fetch a container. If access to an input file is + needed, the +remote_srcdir+ option is pointing to a temporary + directory containing the input files.
remote_finish:: the template of a command that will stop the remote host after diff --git a/lib/RBM.pm b/lib/RBM.pm index 79e0670..c92ae65 100644 --- a/lib/RBM.pm +++ b/lib/RBM.pm @@ -949,7 +949,10 @@ sub build_run { my @scripts = ('pre', $script_name, 'post'); my %scripts_root = ( pre => 1, post => 1); if (project_config($project, "remote_exec", $options)) { - my $cmd = project_config($project, "remote_start", $options); + my $cmd = project_config($project, "remote_start", { + %$options, + remote_srcdir => $srcdir, + }); if ($cmd) { my ($stdout, $stderr, $success, $exit_code) = run_script($project, $cmd, &capture_exec);
tbb-commits@lists.torproject.org