summaryrefslogtreecommitdiffstats
path: root/docker/entrypoint.sh
blob: 6982bffa2274327599f864d30329f189e6135794 (plain)
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
#!/bin/bash -x

if [ ! -d /docs ]; then
    echo source path /docs not exist and no repo for building
    exit 1
fi

cd /docs
for item in conf.py _templates _static
do
    cp -r /opnfvdocs/docs/$item ./
done

# use the same procedure as verify Job
# [TODO]create a common macro can be consumed in Docker and Jenkins
sudo pip install virtualenv
virtualenv $WORKSPACE/venv
. $WORKSPACE/venv/bin/activate
pip install --upgrade pip
pip freeze
pip install tox
tox -edocs

# copy the building result to host
if [ -d /output ]; then
    cp -R ./docs/_build /output
fi