mirror of
https://github.com/trailofbits/algo.git
synced 2025-04-21 16:47:06 +02:00
TravisCI initial. Testing all the components except the cloud roles. #154
This commit is contained in:
parent
cbf59addb3
commit
0a4e19a6d2
1 changed files with 49 additions and 0 deletions
49
.travis.yml
Normal file
49
.travis.yml
Normal file
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
|
||||
language: python
|
||||
python: "2.7"
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-lxc/stable'
|
||||
packages:
|
||||
- python-pip
|
||||
- lxc
|
||||
- lxc-templates
|
||||
- expect-dev
|
||||
- debootstrap
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/lxc/
|
||||
pip: true
|
||||
|
||||
before_cache:
|
||||
- mkdir $HOME/lxc
|
||||
- sudo tar cf $HOME/lxc/cache.tar /var/cache/lxc/
|
||||
- sudo chown $USER. $HOME/lxc/cache.tar
|
||||
|
||||
env:
|
||||
- LXC_NAME=ubuntu1604 LXC_DISTRO=ubuntu LXC_RELEASE=xenial
|
||||
|
||||
install:
|
||||
- sudo tar xf $HOME/lxc/cache.tar -C / || echo "Didn't extract cache."
|
||||
- export LXC_ROOTFS=/var/lib/lxc/$LXC_NAME/rootfs
|
||||
- 'sudo lxc-create -n $LXC_NAME -t ubuntu -- -r $LXC_RELEASE --mirror http://mirrors.us.kernel.org/ubuntu --packages python || true'
|
||||
- 'sudo lxc-start -n $LXC_NAME && until (sudo lxc-info -n $LXC_NAME | grep -q ^IP:); do printf . && sleep 1; done && sleep 2'
|
||||
- export LXC_IP="$(sudo lxc-info -Hin $LXC_NAME)"
|
||||
- sudo /bin/bash -c "printf '\n$LXC_IP test.lxc\n' >> /etc/hosts"
|
||||
- ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''
|
||||
- sudo mkdir -vm 0700 $LXC_ROOTFS/root/.ssh/
|
||||
- sudo cp -v ~/.ssh/id_rsa.pub $LXC_ROOTFS/root/.ssh/authorized_keys
|
||||
- sudo apt-get install build-essential libssl-dev libffi-dev python-dev && sudo pip install -r requirements.txt
|
||||
|
||||
script:
|
||||
- ansible-playbook deploy.yml --syntax-check
|
||||
- ansible-playbook deploy.yml -t local,vpn,dns,ssh_tunneling,security -e "server_ip=$LXC_IP server_user=root IP_subject_alt_name=$LXC_IP local_dns=Y" --skip-tags apparmor
|
Loading…
Add table
Reference in a new issue