Removal of the rememberance of Al
[opnfvdocs.git] / docker / entrypoint.sh
1 #!/bin/bash -x
2
3 if [ ! -d /docs ]; then
4     echo source path /docs not exist and no repo for building
5     exit 1
6 fi
7
8 cd /docs
9 for item in conf.py _templates _static
10 do
11     cp -r /opnfvdocs/docs/$item ./
12 done
13
14 # use the same procedure as verify Job
15 # [TODO]create a common macro can be consumed in Docker and Jenkins
16 sudo pip install virtualenv
17 virtualenv $WORKSPACE/venv
18 . $WORKSPACE/venv/bin/activate
19 pip install --upgrade pip
20 pip freeze
21 pip install tox
22 tox -edocs
23
24 # copy the building result to host
25 if [ -d /output ]; then
26     cp -R ./docs/_build /output
27 fi
28