scripts/vagrant: upload optional directories
Sometimes we need to copy additional directories with sources into VM. Currently, two cases are known: - spdk-abi - dpdk (for CI vs-dpdk jobs) Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com> Change-Id: I242838364d649b29a5a9dc720c6920493b061fa7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17645 Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Michal Berger <michal.berger@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
52e51a29df
commit
6216f996c1
15
scripts/vagrant/Vagrantfile
vendored
15
scripts/vagrant/Vagrantfile
vendored
@ -83,11 +83,20 @@ def copy_vagrant_tools(config,files_sync_backend)
|
||||
config.vm.synced_folder src_path, "/home/vagrant/tools", files_sync_backend
|
||||
end
|
||||
|
||||
def copy_spdk_dir(config, files_sync_backend)
|
||||
def copy_sources_dirs(config, files_sync_backend)
|
||||
return unless ENV['COPY_SPDK_DIR'] == "1"
|
||||
return unless ENV['SPDK_DIR']
|
||||
|
||||
config.vm.synced_folder ENV['SPDK_DIR'], '/home/vagrant/spdk_repo/spdk', files_sync_backend
|
||||
repo_prefix = '/home/vagrant/spdk_repo'
|
||||
config.vm.synced_folder ENV['SPDK_DIR'], "#{repo_prefix}/spdk", files_sync_backend
|
||||
|
||||
# Optional directories
|
||||
for dir in ['spdk-abi', 'dpdk']
|
||||
src_path = "#{ENV['SPDK_DIR']}/../#{dir}"
|
||||
next unless File.directory?(File.expand_path(src_path))
|
||||
|
||||
config.vm.synced_folder src_path, "#{repo_prefix}/#{dir}", files_sync_backend
|
||||
end
|
||||
end
|
||||
|
||||
def copy_spdk_artifacts(config, plugins_sync_backend)
|
||||
@ -344,7 +353,7 @@ Vagrant.configure(2) do |config|
|
||||
# Copy in the user's tools if they exists
|
||||
copy_vagrant_tools(config,files_sync_backend)
|
||||
|
||||
copy_spdk_dir(config, files_sync_backend)
|
||||
copy_sources_dirs(config, files_sync_backend)
|
||||
|
||||
# rsync artifacts from build
|
||||
copy_spdk_artifacts(config, plugins_sync_backend)
|
||||
|
Loading…
Reference in New Issue
Block a user