lf-rtd-verify
-------------
-ReadTheDocs verify script.
+ReadTheDocs verify script. Installs and runs tox.
+
+:Required parameters:
+
+ :doc-dir: Document directory.
+ :python-version: Python version.
check-info-votes
----------------
ReadTheDocs Verify
------------------
-Verify job which runs a tox build of the docs project
+Verify job which runs tox to test the docs project
:Template Names:
- {project-name}-rtd-verify-{stream}
:gerrit-skip-vote: Skip voting for this job. (default: false)
:git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
:project-pattern: Project to trigger build against. (default: \*\*)
+ :python-version: Python version (default: python2)
:stream: Keyword representing a release code-name.
Often the same as the branch. (default: master)
:submodule-recursive: Whether to checkout submodules recursively.
name: lf-rtd-verify
builders:
- inject:
- properties-content: DOC_DIR={doc-dir}
+ properties-content: |
+ DOC_DIR={doc-dir}
+ PYTHON={python-version}
- shell: !include-raw-escape: ../shell/tox-install.sh
- shell: !include-raw-escape: ../shell/rtd-verify.sh
name: lf-infra-tox-install
builders:
- inject:
- properties-content: "PYTHON_VERSION={python-version}"
+ properties-content: "PYTHON={python-version}"
- shell: !include-raw-escape: ../shell/tox-install.sh
- builder:
git-url: "$GIT_URL/$PROJECT"
github-url: "https://github.com"
project-pattern: "**"
+ python-version: python2
stream: master
submodule-recursive: true
submodule-timeout: 10
- lf-infra-pre-build
- lf-rtd-verify:
doc-dir: "{doc-dir}"
+ python-version: "{python-version}"
- job-template:
name: "{project-name}-rtd-verify-{stream}"
--- /dev/null
+---
+fixes:
+ - |
+ Revise tox-install.sh script to invoke python using environment variable
+ PYTHON instead of hardcoding "python", and remove the pip --quiet flag.
+ Extend the RTD template to pass python-version, default python2.
##############################################################################
echo "---> tox-install.sh"
-# Ensure we fail the job if any steps fail.
-# DO NOT set -u as virtualenv's activate script has unbound variables
-set -e -o pipefail
+# Ensure we fail the job if any steps fail or variables are missing.
+# Use -x to show value of $PYTHON in output
+set -eux -o pipefail
# Tox version is pulled in through detox to mitigate version conflict
-python -m pip install --user --quiet --upgrade tox-pyenv
+$PYTHON -m pip install --user --quiet --upgrade tox-pyenv
-echo "----> pip freeze"
-pip freeze
+$PYTHON -m pip freeze