mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-04 00:17:06 +00:00
70 lines
1.9 KiB
Ruby
70 lines
1.9 KiB
Ruby
|
|
Vagrant.configure("2") do |config|
|
|
|
|
config.vm.synced_folder "../..", "/mailinabox", id: "mailinabox", automount: false
|
|
config.vm.provision "file", source:"globals.sh", destination:"globals.sh"
|
|
|
|
if File.file?("preloaded/preloaded-ubuntu-bionic64.box")
|
|
config.vm.box = "preloaded-ubuntu-bionic64"
|
|
config.vm.box_url = "file://" + Dir.pwd + "/preloaded/preloaded-ubuntu-bionic64.box"
|
|
if Vagrant.has_plugin?('vagrant-vbguest')
|
|
# do NOT check the correct additions version when booting this machine
|
|
config.vbguest.auto_update = false
|
|
end
|
|
else
|
|
config.vm.box = "ubuntu/bionic64"
|
|
end
|
|
|
|
# fresh install with encryption-at-rest
|
|
|
|
config.vm.define "remote-nextcloud-docker-ehdd" do |m1|
|
|
m1.vm.provision :shell, :inline => <<-SH
|
|
source globals.sh || exit 1
|
|
export PRIMARY_HOSTNAME=qa1.abc.com
|
|
export FEATURE_MUNIN=false
|
|
export EHDD_KEYFILE=$HOME/keyfile
|
|
echo -n "boo" >$EHDD_KEYFILE
|
|
cd /mailinabox
|
|
tests/system-setup/remote-nextcloud-docker.sh; rc=$?
|
|
if [ $rc -eq 0 ]; then
|
|
tests/runner.sh ehdd default remote-nextcloud; rc=$?
|
|
fi
|
|
echo "EXITCODE: $rc"
|
|
SH
|
|
end
|
|
|
|
# remote-nextcloud-docker w/basic data
|
|
|
|
config.vm.define "remote-nextcloud-docker" do |m1|
|
|
m1.vm.provision :shell, :inline => <<-SH
|
|
source globals.sh || exit 1
|
|
export PRIMARY_HOSTNAME=qa2.abc.com
|
|
export FEATURE_MUNIN=false
|
|
cd /mailinabox
|
|
tests/system-setup/remote-nextcloud-docker.sh upgrade basic; rc=$?
|
|
if [ $rc -eq 0 ]; then
|
|
tests/runner.sh default remote-nextcloud upgrade-basic; rc=$?
|
|
fi
|
|
echo "EXITCODE: $rc"
|
|
SH
|
|
end
|
|
|
|
|
|
# upgrade-from-upstream
|
|
|
|
config.vm.define "upgrade-from-upstream" do |m1|
|
|
m1.vm.provision :shell, :inline => <<-SH
|
|
source globals.sh || exit 1
|
|
export PRIMARY_HOSTNAME=qa3.abc.com
|
|
export UPSTREAM_TAG=master
|
|
cd /mailinabox
|
|
tests/system-setup/upgrade-from-upstream.sh basic totpuser; rc=$?
|
|
if [ $rc -eq 0 ]; then
|
|
tests/runner.sh upgrade-basic upgrade-totpuser default; rc=$?
|
|
fi
|
|
echo "EXITCODE: $rc"
|
|
SH
|
|
end
|
|
|
|
end
|