blob: e8e00ef6965296d57954863bca170f9830a26208 [file] [log] [blame]
peusterm86fc48e2017-02-06 08:48:56 +01001#!/bin/bash
2#
3# This is the entry point for Jenkins.
4# Script has do be called from "son-emu" root directory, like: sudo ./utils/ci/jenkins_entrypoint.sh
5export DOCKER_HOST="unix:///var/run/docker.sock"
6
peusterm7e8aa5e2017-02-06 09:09:26 +01007# don't rely on Debian/Ubuntu Docker engine
peusterm8046dfe2017-02-06 09:10:54 +01008apt-get remove docker-engine
peusterm7e8aa5e2017-02-06 09:09:26 +01009
peusterm86fc48e2017-02-06 08:48:56 +010010set -e
11set -x
12
13SON_EMU_DIR=$(pwd)
14cd $SON_EMU_DIR/../
15
16# prepare
17apt-get update
18apt-get install -y git ansible aptitude
19echo "localhost ansible_connection=local" >> /etc/ansible/hosts
20
21# install containernet
22git clone https://github.com/containernet/containernet.git
23CONTAINERNET_DIR=$(pwd)/containernet
24echo "Installing containernet (will take some time ~30 minutes) ..."
25cd $CONTAINERNET_DIR/ansible
26ansible-playbook install.yml
27
28# install son-emu
29echo "Installing son-emu (will take some time) ..."
30cd $SON_EMU_DIR/ansible
31ansible-playbook install.yml
32
33# execute son-emu tests at the end to validate installation
34echo "Running son-emu unit tests to validate installation"
35cd $SON_EMU_DIR
36python setup.py develop
37py.test -v src/emuvim/test/unittests
38
39
40