diff options
author | gjoranv <gv@oath.com> | 2018-07-06 00:18:26 +0200 |
---|---|---|
committer | gjoranv <gv@oath.com> | 2018-07-06 11:48:00 +0200 |
commit | 205f63a8c545479222cd947849d6da7d373b56de (patch) | |
tree | 5e670175a991f4abac100c2a7c344e6ae7cbc394 /vagrant/Vagrantfile | |
parent | ce22337fe46a60be67d5f2b8f3fe5cd5bc5565ea (diff) |
Use correct version of dev tools and set VESPA_HOME.
- Add VESPA_HOME/bin to PATH
Diffstat (limited to 'vagrant/Vagrantfile')
-rw-r--r-- | vagrant/Vagrantfile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index c6db23620aa..84836d05e72 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -58,4 +58,18 @@ Vagrant.configure("2") do |config| yum update -y hostname localhost SHELL + + # Add settings for Vespa and dev tools as the default user, usually 'vagrant' (privileged: false) + # NOTE: adding these settings to .bashrc would break vagrant suspend/resume/provision + # due to env vars modified by /opt/rh/devtoolset-7/enable. + config.vm.provision "shell", privileged: false, inline: <<-SCRIPT + grep -l VESPA_HOME ~/.bash_profile >/dev/null || (\ + printf "%s\n" \ + 'export VESPA_HOME=$HOME/vespa' \ + 'export PATH=$PATH:$VESPA_HOME/bin' \ + 'source /opt/rh/rh-maven35/enable' \ + 'source /opt/rh/devtoolset-7/enable' \ + >> ~/.bash_profile ) + SCRIPT + end |