mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-02 18:13:13 +02:00
Simplistic testing of the Docker image
This simply uses the same LXC system that was just tested. It's functional, but minimal.
This commit is contained in:
parent
6dc86e9b6f
commit
8b20ba1d57
1 changed files with 10 additions and 1 deletions
11
.travis.yml
11
.travis.yml
|
@ -4,6 +4,9 @@ python: "2.7"
|
|||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
|
@ -33,6 +36,9 @@ env:
|
|||
- LXC_NAME=ubuntu1604 LXC_DISTRO=ubuntu LXC_RELEASE=xenial
|
||||
- LXC_NAME=ubuntu1710 LXC_DISTRO=ubuntu LXC_RELEASE=artful
|
||||
|
||||
before_install:
|
||||
- docker build -t travis/algo .
|
||||
|
||||
install:
|
||||
- sudo tar xf $HOME/lxc/cache.tar -C / || echo "Didn't extract cache."
|
||||
- export LXC_ROOTFS=/var/lib/lxc/$LXC_NAME/rootfs
|
||||
|
@ -41,18 +47,21 @@ install:
|
|||
- 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 ''
|
||||
- chmod 0644 ~/.ssh/config
|
||||
- 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
|
||||
- pip install ansible-lint
|
||||
- gem install awesome_bot
|
||||
- export DEPLOY_ARGS="server_ip=$LXC_IP server_user=root IP_subject_alt_name=$LXC_IP local_dns=Y"
|
||||
|
||||
script:
|
||||
# - awesome_bot --allow-dupe --skip-save-results *.md docs/*.md --white-list paypal.com,do.co,microsoft.com,https://github.com/trailofbits/algo/archive/master.zip,https://github.com/trailofbits/algo/issues/new
|
||||
# - shellcheck algo
|
||||
# - ansible-lint deploy.yml users.yml deploy_client.yml
|
||||
- ansible-playbook deploy.yml --syntax-check
|
||||
- ansible-playbook deploy.yml -t local,vpn,dns,ssh_tunneling,tests -e "server_ip=$LXC_IP server_user=root IP_subject_alt_name=$LXC_IP local_dns=Y"
|
||||
- ansible-playbook deploy.yml -t local,vpn,dns,ssh_tunneling,tests -e "${DEPLOY_ARGS}"
|
||||
- docker run -it -v $(pwd)/config.cfg:/algo/config.cfg -v ~/.ssh:/root/.ssh -e "DEPLOY_ARGS=${DEPLOY_ARGS}" travis/algo /bin/sh -c "chown -R 0:0 /root/.ssh && ls -l /root/.ssh && source env/bin/activate && ansible-playbook deploy.yml -t local,vpn,dns,ssh_tunneling,security,tests -e \"${DEPLOY_ARGS}\""
|
||||
|
||||
after_script:
|
||||
- ./tests/update-users.sh
|
||||
|
|
Loading…
Add table
Reference in a new issue