-
Notifications
You must be signed in to change notification settings - Fork 168
/
Copy path.travis.yml
45 lines (40 loc) · 1.22 KB
/
.travis.yml
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
language: ruby
dist: trusty
rvm:
- 2.3.6
- 2.4.3
- 2.5.0
env:
- VAGRANT_VERSION=1.8.5
- VAGRANT_VERSION=2.0.0
- VAGRANT_VERSION=2.2.4
install:
- sudo apt-get update
- sudo sudo apt-get -y install linux-headers-$(uname -r)
- bundle install
- wget http://download.virtualbox.org/virtualbox/5.1.6/virtualbox-5.1_5.1.6-110634~Ubuntu~trusty_amd64.deb -O vbox.deb
- wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_x86_64.deb -O vagrant.deb
- sudo dpkg -i vbox.deb
- sudo dpkg -i vagrant.deb
before_script:
- VBoxManage --version
- vagrant --version
- bundle exec berks --version
# Fix for berkshelf/berkshelf/issues/1744
# Occur with ruby 2.5.0:
# https://travis-ci.org/Sliim/pentest-env/builds/403965094
- gem update --system 2.7.5
script:
- bundle exec berks vendor
- bundle exec rubocop -D
- |
for rc in examples/*; do
echo Status for $rc
PENTESTRC=$rc VAGRANT_LOG=debug vagrant status 2>vagrant.log; vcode=$?
if test $vcode -ne 0; then
echo " ERROR Pentest-env status error!" >&2
echo "Logs:";cat vagrant.log;exit $vcode
else
echo "Logs:";grep -E "[A-Z]+ pentest-env/" vagrant.log;echo
fi
done