-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathVagrantfile
55 lines (46 loc) · 1.25 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
PROVISION_SCRIPTS = [
<<-EOF,
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -yq lvm2 xfsprogs
EOF
<<-EOF,
if ! command -v docker ; then
curl -sSL https://get.docker.io | bash
fi
EOF
'usermod -a -G docker vagrant',
'usermod -a -G docker ubuntu',
'docker pull quay.io/travisci/travis-ruby:latest',
<<-EOF,
if ! jq --version ; then
curl -sSL -o /usr/local/bin/jq http://stedolan.github.io/jq/download/linux64/jq
chmod 0755 /usr/local/bin/jq
fi
EOF
<<-EOF,
docker images | grep -q -E '^travis\\s+\\bruby\\b\\s+' || \\
docker tag quay.io/travisci/travis-ruby:latest travis:ruby
EOF
<<-EOF
cp -v /vagrant/bin/travis-download-deb-sources /usr/local/bin/
chmod 0755 /usr/local/bin/travis-download-deb-sources
EOF
]
Vagrant.configure('2') do |config|
config.vm.define 'trusty' do |trusty|
trusty.vm.hostname = 'apt-package-safelist-trusty'
trusty.vm.box = 'ubuntu/trusty64'
end
config.vm.provider 'virtualbox' do |vbox|
vbox.memory = 4096
vbox.cpus = 2
end
PROVISION_SCRIPTS.each do |script|
config.vm.provision 'shell', inline: <<-EOF, privileged: true
set -o errexit
set -o xtrace
#{script}
EOF
end
end