diff options
Diffstat (limited to 'docker/entrypoint.sh')
-rw-r--r-- | docker/entrypoint.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 000000000..6982bffa2 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,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 + |