SSL証明書の署名に使用する独自の全社的な認証局があります。ほとんどの場合、OS (この場合は CentOS 7) がその権限を登録している限り、これは正常に機能します。ここに保存されます:
/etc/pki/ca-trust/source/anchors/company_ca.pem
これにより、Firefox/chrome はそれを介して署名された SSL 証明書を信頼できるようになります。
sphinx-build -W -blinkcheck […]
リンクの腐敗がドキュメントに吸い込まれているため、Pythonプロジェクトのリンクがまだ有効であることを確認するために使用しています。これはすべての外部リンクで問題ありません。
ただし、カマキリ (バグ トラッカー) の独自の SSL バージョンにリンクすると、
SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)'),)))
エラー。私たちのセットアップでは、Mantis は https でのみ実行されます。
会社全体の権限を追加するように sphinx に指示するにはどうすればよいですか?
私は通常、次のように tox を介してこれを実行します。
これを実行する tox フラグメント:
[testenv:docs]
basepython=python2.7
deps=-r{toxinidir}/requirements/requirements.txt
commands=./check_docs.bash
バッシュ スクリプト:
#!/bin/bash
set -eux
sphinx-apidoc --force --separate --private --module-first -o docs src/ '*/*test*'
cd docs
pytest --maxfail=1 \
--tb=line \
-v \
--junitxml=junit_sphinx.xml \
--exitfirst \
--failed-first \
--full-trace \
-ra \
--capture=no \
check_sphinx.py
そしてpythonsスクリプト:
import subprocess
def test_linkcheck(tmpdir):
doctrees = tmpdir.join("doctrees")
htmldir = tmpdir.join("html")
subprocess.check_call([
"sphinx-build", "-W", "-blinkcheck", "-d",
str(doctrees), ".",
str(htmldir)
])
def test_build_docs(tmpdir):
doctrees = tmpdir.join("doctrees")
htmldir = tmpdir.join("html")
subprocess.check_call([
"sphinx-build", "-W", "-bhtml", "-d",
str(doctrees), ".",
str(htmldir)
])