- - shell: |
- if [ "$GERRIT_PROJECT" != "docs" ]; then
- cd docs/submodules/$GERRIT_PROJECT
- git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
- else
- git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
- fi
- - shell: |
- virtualenv $WORKSPACE/venv
- source $WORKSPACE/venv/bin/activate
- pip install --upgrade pip
- pip freeze
- pip install tox
- tox -edocs
+ - shell: |
+ if [ "$GERRIT_PROJECT" != "docs" ]; then
+ cd docs/submodules/$GERRIT_PROJECT
+ git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
+ else
+ git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
+ fi
+ - shell: |
+ virtualenv $WORKSPACE/venv
+ source $WORKSPACE/venv/bin/activate
+ PYTHON="$WORKSPACE/venv/bin/python"
+ $PYTHON -m pip install --upgrade pip
+ $PYTHON -m pip freeze
+ $PYTHON -m pip install tox
+ tox -edocs
+
+ # Archive generated docs
+ mkdir -p "$WORKSPACE/archives"
+ mv docs/_build/html archives/