diff options
author | 2017-12-07 00:08:59 -0800 | |
---|---|---|
committer | 2018-02-06 19:11:54 +0800 | |
commit | 658778cd891d9327a1ce91e6bcbc8fcfd81e7cd6 (patch) | |
tree | 8eedc1a67c0e1a890fad2daf3cdfe8b51532246e /docker/entrypoint.sh | |
parent | 63361ead5508654794c5a42f86861dfdf39811a2 (diff) |
Add opnfvdocs build container
Currently, rst files only can be built in opnfvdocs project's CI
pipeline and feature projects can not verify this before submitting doc
files. Feature project can use this container to build its docs without
installing any docs tools.
JIRA: DOCS-183
Change-Id: I715d19d24da776d76e509309c9010d4072e6f4f8
Signed-off-by: Julien <zhang.jun3g@zte.com.cn>
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 + |